Re: Metaprogramming question

2014-02-11 Thread Zachary Ware
On Tue, Feb 11, 2014 at 12:13 PM, Travis Griggs wrote: > So here’s my basic question. Is there anyway to programatically query that > information in python code? > > inspect.signature(datetime.datetime.now) > > just gives a ValueError. inspect must only be good for the python code that I > write

Re: Metaprogramming question

2006-10-06 Thread Georg Brandl
Steve Menard wrote: > I have a need to create class instance without invokking the class' __init__ > method. > > Were I using old-style classes, I'd use new.instance() function. However, I > am using new-style classes and new.instance() complain "TypeError: > instance() argument 1 must be clas

Re: Metaprogramming question

2006-10-05 Thread MonkeeSage
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 -- http://mail.python.org/mailman/listinfo/python-list