what is wrong with d.clear()?
sohcahtoa82 at gmail.com
sohcahtoa82 at gmail.com
Mon Dec 22 13:15:45 EST 2014
On Monday, December 22, 2014 12:16:15 AM UTC-8, shawool wrote:
> Hi,
>
> where am i going wrong ?
>
> $ python3
> Python 3.2.5 (default, Oct 2 2013, 22:58:11)
> [GCC 4.8.1] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> d = {}
> >>> import sys
> >>> d = sys.modules
> >>> type(d)
> <class 'dict'>
> >>> dir(d)
> ['__class__', '__contains__', '__delattr__', '__delitem__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'pop', 'popitem', 'setdefault', 'update', 'values']
> >>> d.clear()
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> >>> d
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> >>> quit()
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
>
>
> Thanks in advance.
>
>
> Best regards,
>
> Shawool
Is there a reason you're composing your messages with a large, colored font?
Shit's obnoxious, yo.
More information about the Python-list
mailing list