Scott Sanderson, Joe Jevnik - Playing with Python Bytecode - PyCon 2016

Поділитися
Вставка
  • Опубліковано 4 лис 2024

КОМЕНТАРІ • 16

  • @markp.5875
    @markp.5875 2 роки тому +4

    For those trying to reproduce this on more recent Python versions, the attribute list for CodeType has changed. As of 3.11, it's
    'co_argcount', 'co_posonlyargcount', 'co_kwonlyargcount', 'co_nlocals', 'co_stacksize', 'co_flags', 'co_code',
    'co_consts', 'co_names', 'co_varnames', 'co_filename', 'co_name', 'co_qualname', 'co_firstlineno', 'co_linetable',
    'co_exceptiontable', 'co_freevars', 'co_cellvars',

  • @lerinarazafy7826
    @lerinarazafy7826 8 років тому +11

    Great Duo. What a pleasant and informative presentation.

  • @ranudar5666
    @ranudar5666 2 роки тому +1

    The passion is real! Thanks a lot for this awesome talk and the glimpse behind the curtain :-)

  • @maximeistasse8787
    @maximeistasse8787 8 років тому +3

    Great video!
    I did not watch it completely, so maybe it has been mentioned, but by using the ctypes module and the fact id() returns adresses in memory on CPython, we can well modify co_consts in place. Just my 2 cents for what was told around 21:00.

  • @thetdg
    @thetdg 7 років тому +8

    What a presentation! Mind blown!

    • @nilashishchakraborty3983
      @nilashishchakraborty3983 4 роки тому +2

      Look where we meet again! :D

    • @thetdg
      @thetdg 4 роки тому +1

      @@nilashishchakraborty3983 This was really one of the most entertaining presentations I've ever seen.

  • @AadidevSooknananNXS
    @AadidevSooknananNXS Рік тому +1

    This was brilliant!

  • @edwardminnix7438
    @edwardminnix7438 8 років тому +2

    Would it be possible to use bytecode manipulation to help make optimizations like tail call recursion?

    • @Grazfather
      @Grazfather 8 років тому +1

      I don't think so. tail call recursion would required that function calls know how build a stack frame on top of an existing one, which is done in the interpreter and not supported by the byte code.

  • @ktxed
    @ktxed 8 років тому +5

    what console are they using? it looks like it's running in chrome :-?

  • @arjunkirpal9776
    @arjunkirpal9776 7 років тому +1

    Awesome

  • @cnliving
    @cnliving 8 років тому +2

    Good

  • @andrey730
    @andrey730 6 місяців тому

    baddone 😂😂