Re: Trying to learn about metaclasses

2011-07-30 Thread Steven D'Aprano
bruno.desthuilli...@gmail.com wrote: > On 25 juil, 17:36, "Steven W. Orr" wrote: >> I have been doing a lot of reading. I'm starting to get it. I think it's >> really cool as well as dangerous, > > Dangerous ??? Why so ? Is there anything "dangerous" in a constructor > or an initialiser ??? A me

Re: Trying to learn about metaclasses

2011-07-30 Thread bruno.desthuilli...@gmail.com
On 25 juil, 17:36, "Steven W. Orr" wrote: > I have been doing a lot of reading. I'm starting to get it. I think it's > really cool as well as dangerous, Dangerous ??? Why so ? Is there anything "dangerous" in a constructor or an initialiser ??? A metaclass is just a class, and a class is just an

Re: Trying to learn about metaclasses

2011-07-26 Thread Thomas Jollans
On 26/07/11 04:44, Victor Khangulov wrote: > Hi Steven, > > I too am just learning about metaclasses in Python and I found the > example you posted to be excellent. > > I played around with it and noticed that the issue seems to be the > double-underscore in front of the fields (cls.__fields = {}

Re: Trying to learn about metaclasses

2011-07-25 Thread Victor Khangulov
Hi Steven, I too am just learning about metaclasses in Python and I found the example you posted to be excellent. I played around with it and noticed that the issue seems to be the double-underscore in front of the fields (cls.__fields = {}). If you change this parameter to use the single-u

Re: Trying to learn about metaclasses

2011-07-25 Thread Chris Kaynor
On Mon, Jul 25, 2011 at 8:36 AM, Steven W. Orr wrote: > I have been doing a lot of reading. I'm starting to get it. I think it's > really cool as well as dangerous, but I plan on being respectful of the > construct. I found a web page that I found quite readable. > > http://cleverdevil.org/**comp

Re: Trying to learn about metaclasses

2011-07-25 Thread Karim
Very good. Karim On 07/25/2011 05:46 PM, jfine wrote: Hi I gave a tutorial at this year's EuroPython that covered metaclasses. You can get the tutorial materials from a link on: http://ep2011.europython.eu/conference/talks/objects-and-classes-in-python-and-javascript Jonathan -- http://ma

Re: Trying to learn about metaclasses

2011-07-25 Thread Peter Otten
Steven W. Orr wrote: > I have been doing a lot of reading. I'm starting to get it. I think it's > really cool as well as dangerous, but I plan on being respectful of the > construct. I found a web page that I found quite readable. > > http://cleverdevil.org/computing/78/ > > So, I tried to run t

Re: Trying to learn about metaclasses

2011-07-25 Thread jfine
Hi I gave a tutorial at this year's EuroPython that covered metaclasses. You can get the tutorial materials from a link on: http://ep2011.europython.eu/conference/talks/objects-and-classes-in-python-and-javascript Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Trying to learn about metaclasses

2011-07-25 Thread Steven W. Orr
I have been doing a lot of reading. I'm starting to get it. I think it's really cool as well as dangerous, but I plan on being respectful of the construct. I found a web page that I found quite readable. http://cleverdevil.org/computing/78/ So, I tried to run the example code (below), and I ge