On Thu, Oct 22, 2009 at 9:09 PM, Stephen Hansen <[email protected]>wrote:
> >>> class myclass(object):
> ... def __new__(cls, *args, **kwargs):
> ... print args
> ... print kwargs
> ... self = object.__new__(cls)
> ... return self
> ... def __init__(self, *args, **kwargs):
> ... print args
> ... print kwargs
> ...
> >>> A = a()
> ()
> {}
> ()
> {}
> >>> A = a(1,2,3)
> (1, 2, 3)
> {}
> (1, 2, 3)
> {}
>
>
Sigh, as I try to correct stupid in-interactive-interpreter demonstration
code's really bad naming scheme in email but do it half-assed; obviously
those calls are supposed to be like "a = myclass()" and "a =
myclass(1,2,3)"
HTH,
>
> --S
>
--
Stephen Hansen
Development
Advanced Prepress Technology
[email protected]
(818) 748-9282
--
http://mail.python.org/mailman/listinfo/python-list