Re: Meta classes - real example

2016-10-20 Thread Mr. Wrobel
W dniu 18.10.2016 o 16:42, Ethan Furman pisze: On 10/17/2016 11:44 PM, Mr. Wrobel wrote: Ok,so in general, we could say that using Metclasses is ok for manipulating __new__ but not that what is setting by __init__. Am I right? No and yes. In this code (python 2 syntax): #untested class

Re: Meta classes - real example

2016-10-18 Thread Ethan Furman
On 10/17/2016 11:44 PM, Mr. Wrobel wrote: Ok,so in general, we could say that using Metclasses is ok for manipulating __new__ but not that what is setting by __init__. Am I right? No and yes. In this code (python 2 syntax): #untested class Wonderful(object): __metaclass__ =

Re: Meta classes - real example

2016-10-18 Thread Mr. Wrobel
W dniu 17.10.2016 o 23:23, Ethan Furman pisze: On 10/17/2016 09:23 AM, Mr. Wrobel wrote: W dniu 17.10.2016 o 18:16, Chris Angelico pisze: On Tue, Oct 18, 2016 at 3:03 AM, Mr. Wrobel wrote: I am looking for an example of metaclass usage. Especially I am interestet in manipulating instance

Re: Meta classes - real example

2016-10-17 Thread Ethan Furman
On 10/17/2016 09:23 AM, Mr. Wrobel wrote: W dniu 17.10.2016 o 18:16, Chris Angelico pisze: On Tue, Oct 18, 2016 at 3:03 AM, Mr. Wrobel wrote: I am looking for an example of metaclass usage. Especially I am interestet in manipulating instance variables, for example: My class: class

Re: Meta classes - real example

2016-10-17 Thread Mr. Wrobel
W dniu 17.10.2016 o 18:16, Chris Angelico pisze: On Tue, Oct 18, 2016 at 3:03 AM, Mr. Wrobel wrote: Hi, I am looking for an example of metaclass usage. Especially I am interestet in manipulating instance variables, for example: My class: class MrMeta(type): pass

Re: Meta classes - real example

2016-10-17 Thread Chris Angelico
On Tue, Oct 18, 2016 at 3:03 AM, Mr. Wrobel wrote: > Hi, > > I am looking for an example of metaclass usage. Especially I am interestet > in manipulating instance variables, for example: > > My class: > class MrMeta(type): > pass > > class Mr(object): >