Prothon Prototypes vs Python Classes

Paul Prescod paul at prescod.net
Sun Mar 28 15:03:39 EST 2004


I'm totally confused. There was a statement of fact about how compilers 
work which I refuted. Now it's shifting to a question of programming style.

Let's recap:

John Roth wrote:

> "Paul Prescod" <paul at prescod.net> wrote in message
> news:mailman.10.1080485351.20120.python-list at python.org...
> 
>>John Roth wrote:
>>
>>
>>>It's certainly true that in a prototype based language all objects
>>>exist: there are no objects that the compiler deals with but does
>>>not put into the resulting program. And it's quite true that it does
>>>open up the floodgates for a lot of messiness.
>>

I responded:

>>Ummm. This is also true for Python. Python classes exist at runtime.

Given

class A:
	pass

a = A()

Both "a" and "A" are put in the "resulting program" (bytecodes) just as 
they would in a prototype-based language. A() is a completely 
first-class object, just like a prototype in a prototype-based language.

  Paul Prescod






More information about the Python-list mailing list