~~stoggle_buttons~~ ===== Nick Coghlan’s Python Notes ===== * [[http://python-notes.curiousefficiency.org]] * [[http://python-notes.curiousefficiency.org/en/latest/python3/multicore_python.html|Efficiently Exploiting Multiple Cores with Python]] Toda la discusión sobre GIL, PyPy, Numba, Cython y NumPy en términos de eficiencia computacional vs facilidad de uso * [[http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html|Traps for the Unwary in Python’s Import System]] ''import'' de Python explicado ===== links ===== * [[https://www.youtube.com/playlist?list=PLzV58Zm8FuBL6OAv1Yu6AwXZrnsFbbR0S|CPython Internals]] * [[http://sebastianraschka.com/Articles/2014_deep_python.html|Diving deep into Python – the not-so-obvious language parts]] * [[https://realpython.com/pointers-in-python/|Pointers in Python]] * [[https://github.com/satwikkansal/wtfpython/|WTF Python]] Comportamientos extraños de Python para explicar detalles internos * [[http://www.pythontutor.com|Python Tutor]] Ejecutar código de Python y ver qué pasa paso a paso a nivel de bytecode Python * [[https://rushter.com/blog/python-code-isolation/|On code isolation in Python]] -> Patching Python code ===== sententcia with ===== [[https://docs.python.org/3/reference/compound_stmts.html#the-with-statement]] Cuando se abren recursos como conexiones remotas o archivos, que necesitan un proceso de limpieza después de usarlos, ''with'' se ocupa de todo ello (siempre que el objeto implemente los métodos mágicos necesarios) #The following code: with EXPRESSION as TARGET: SUITE #is semantically equivalent to: manager = (EXPRESSION) enter = type(manager).__enter__ exit = type(manager).__exit__ value = enter(manager) hit_except = False try: TARGET = value SUITE except: hit_except = True if not exit(manager, *sys.exc_info()): raise finally: if not hit_except: exit(manager, None, None, None) ===== Gestión de memoria ===== * [[https://docs.python.org/3/c-api/memory.html]] * [[https://rushter.com/blog/python-memory-managment/]] * [[https://realpython.com/python-memory-management/]] ===== Garbage Collection ===== * [[https://docs.python.org/3.7/c-api/intro.html#objects-types-and-reference-counts]] * [[https://rushter.com/blog/python-garbage-collector/]] ===== Concurrencia ===== * [[https://medium.com/hackernoon/has-the-python-gil-been-slain-9440d28fa93d|Has the Python GIL been slain?]] * [[python:concurrencia]]