>
>  copy, here, is a dict method. It will create a dict.
> If you really need it, you could try this:
>
> import copy
> class neodict(dict):
>    def copy(self):
>        return copy.copy(self)
>
> d = neodict()
> print type(d)
> dd = d.copy()
> print type(dd)


One more gotcha to python... OO in python is strange :p

IMO, if i subclass a class, all instance methods from a subclass instance
should work with the subclass. But i'm guessing python doesn't make this
distinction of instance/class methods like some other languages do (unless
one uses annotations, what appears to be not the case with the dict class).

Not that it inhibits me on using python in any way, in fact i do use python
for my projects. I'm new to it, and I like some of its features, but some
others are rather strange.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to