Metaprogramming question

MonkeeSage MonkeeSage at gmail.com
Thu Oct 5 22:22:50 EDT 2006


Steve Menard wrote:
> So my question is, how to replicate new.instance() functionality with new
> classes?

class A(object):
  def __init__(self):
    print "Class A"
A()
A.__new__(A) # <- this one

Regards,
Jordan




More information about the Python-list mailing list