P
peter
Hi --
.... foo = 'bar'
.... def __new__(cls, s):
.... c = super(ts, cls)
.... return c.fromtimestamp(s)
....Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 5, in __new__
TypeError: __new__() takes exactly 2 arguments (9 given)
I don't understand why that happens -- am I correct in assuming that
the call to .fromtimestamp() is picking up on the ts class? Shouldn't
it get the datetime class instead?
(Yes, I am aware of the problems of using datetime and timestamps)
Could some kind soul please enlighten me?
peter.
.... foo = 'bar'
.... def __new__(cls, s):
.... c = super(ts, cls)
.... return c.fromtimestamp(s)
....Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 5, in __new__
TypeError: __new__() takes exactly 2 arguments (9 given)
I don't understand why that happens -- am I correct in assuming that
the call to .fromtimestamp() is picking up on the ts class? Shouldn't
it get the datetime class instead?
(Yes, I am aware of the problems of using datetime and timestamps)
Could some kind soul please enlighten me?
peter.