W dniu 23.12.2016 o 15:14, Ian Kelly pisze:
(...)
cls.added_in_init = 'test'
Man, you are awsome genius! Finally somebody was able to explain me what
is the power of __new__ and difference between __init__ !!!
So what I wanted to achieve was adding some new attributes to the class
ins
W dniu 21.12.2016 o 02:51, Ethan Furman pisze:
On 12/20/2016 03:39 PM, Ben Finney wrote:
"Mr. Wrobel" writes:
Quick question, can anybody tell me when to use __init__ instead of
__new__ in meta programming?
Use ‘__new__’ to do the work of *creating* one instance from nothing;
Hi,
Quick question, can anybody tell me when to use __init__ instead of
__new__ in meta programming?
I see that __new__ can be used mostly when I want to manipulate with
class variables that are stored into dictionary.
But when to use __init__? Any example?
Thanx,
M
--
https://mail.python.
W dniu 05.11.2016 o 22:17, Ben Bacarisse pisze:
Steve D'Aprano writes:
On Sun, 6 Nov 2016 04:10 am, Mr. Wrobel wrote:
Hi,
Some skeptics asked my why there is a reason to use Python against of
any other "not interpreted" languages, like objective-C.
Here's the &quo
Hi,
Some skeptics asked my why there is a reason to use Python against of
any other "not interpreted" languages, like objective-C. As my
explanation, I have answered that there is a a lot of useful APIs,
language is modern, has advanced objective architecture, and what is the
most important -
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
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
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
class Mr(object
you guide me please?
Thanks!
Mr. Wrobel
--
https://mail.python.org/mailman/listinfo/python-list