Re: Re: Re: Re[2]: Re: class proposal

Serge Orlov <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
Mark Hahn wrote:
> Lenard Lindstrom wrote:

>>> Can you show me a metaclass example that Prothon cannot handle?  I
>>> would like to understand this situation better.
>>>
>> Metaclassing let me make Python's class statement create prototype
>> object instances. In Python the class statement is simply a
>> specialized
>> function call. The inheritance section and class body are evaluated to
>> provide the arguments. By default object 'type' is called to return a
>> new object. Metaclassing is simply a way to change the function
>> called.
>> This permits new kinds of class systems to be added to Python without
>> changes to the language. But in Prothon one only has prototypes. And
>> the
>> object statement can only return new prototype instances. In Python if
>> you do not like existing object behaviour you are free to implement
>> your own object types and have language support for them.

> You have explained how Python metaclasses work.  I was asking for something
> metaclasses can do that Prothon cannot do.

> Serge gave me a reference to some metaclass examples.  I am in the process
> of trying to understand them and see how Prothon would deal with them.
> Serge himself says that metaclasses are only decorators, whatever that
> means.

I don't remember saying *are only* decorators, I think I wrote "mostly as".
I also think it's abuse.

What do you mean whatever that [decorators] means? Don't you follow
python-dev? Or do you think I use the word in some other way?


  -- Serge
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.