[Baypiggies] overriding boolean and,or operators?

Alex Martelli aleax at google.com
Tue Jul 13 04:45:16 CEST 2010

On Mon, Jul 12, 2010 at 6:02 PM, Aahz <aahz at pythoncraft.com> wrote:
> On Mon, Jul 12, 2010, Glen Jarvis wrote:
>>     To know Python down to the bytecode level as per Alex's email leaves me
>> in awe.... (and reminds me of how much a newb I am with Python). Does anyone
>> teach a class on this level? An advanced class?  I'd *soo* want to take a
>> course like that if/when it ever becomes available...  (as long as I have
>> the prereq's of course -- I may not)...
> I'm doubtful Alex knows Python down to the bytecode level (but because
> he's Alex I could easily be wrong).  Instead, the point is that anyone
> can use dis.dis to find out that information *yourself*!

Definitely, `dis.dis` is THE way to start learning about bytecode --
which, if you've ever done assembly programming on a stack-oriented
machine, is really not hard at all.  You can always follow through
with ceval.c if there's some part that isn't immediately clear.

A couple years ago I did give a tech talk which I had originally
titled "highly advanced python: the internals" -- but retitled in a
hurry to "slightly advanced python: some well-documented internals" as
I saw that the audience (mostly engineers from youtube) would include
some people that could give me (or I suspect even Guido) lessons in
optimizing and stretching Python to an incredible degree;-).  The
video is at http://www.youtube.com/watch?v=23s9Wc3aWGY and the PDF of
the slides is at http://www.aleax.it/ut_pyadv.pdf .

It's just one hour, and covers many issues (metaclasses, descriptors,
introspection, garbage collection, stack frames, and bytecode), so it
can't go very deep in any of them, but I hope it can serve as an
"appetizer" of sorts;-).


More information about the Baypiggies mailing list