The standard is to use `cls`. In the __new__ method you can use `mcl` or `meta`.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jul 17, 2012 at 6:23 AM, Michele Simionato
michele.simion...@gmail.com wrote:
The standard is to use `cls`. In the __new__ method you can use `mcl` or
`meta`.
I've also seen `mcs` a fair amount.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jul 17, 2012 at 12:10 AM, alex23 wuwe...@gmail.com wrote:
On Jul 17, 1:29 am, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
Here's a style question for you: in a metaclass, what should I call the
instance parameter of methods, cls or self?
Maybe portmanteu it as
On Tue, 17 Jul 2012 05:23:22 -0700, Michele Simionato wrote:
The standard is to use `cls`. In the __new__ method you can use `mcl` or
`meta`.
Thanks to everyone who answered.
I think I will stick with meta and cls.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Here's a style question for you: in a metaclass, what should I call the
instance parameter of methods, cls or self?
class ExampleMeta(type):
def method(self, *args): ...
I'm not quite sure if that feels right. On the one hand, self is the
ExampleMeta instance alright... but on the other,
On 7/16/2012 11:29 AM, Steven D'Aprano wrote:
Here's a style question for you: in a metaclass, what should I call the
instance parameter of methods, cls or self?
class ExampleMeta(type):
def method(self, *args): ...
I'm not quite sure if that feels right. On the one hand, self is the