Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82759
| Date | 2014-12-21 12:58 +0530 |
|---|---|
| Subject | what is wrong with d.clear()? |
| From | shawool <shawool@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17113.1419236165.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
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
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
what is wrong with d.clear()? shawool <shawool@gmail.com> - 2014-12-21 12:58 +0530
Re: what is wrong with d.clear()? sohcahtoa82@gmail.com - 2014-12-22 10:15 -0800
Re: what is wrong with d.clear()? Rick Johnson <rantingrickjohnson@gmail.com> - 2014-12-22 12:54 -0800
Re: what is wrong with d.clear()? sohcahtoa82@gmail.com - 2014-12-22 13:19 -0800
Re: what is wrong with d.clear()? Dave Angel <davea@davea.name> - 2014-12-22 16:59 -0500
Re: what is wrong with d.clear()? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-12-23 13:33 +1100
Re: what is wrong with d.clear()? Dave Angel <davea@davea.name> - 2014-12-22 22:18 -0500
Re: what is wrong with d.clear()? Steve Hayes <hayesstw@telkomsa.net> - 2014-12-23 12:25 +0200
Re: what is wrong with d.clear()? shawool <shawool@gmail.com> - 2014-12-23 18:29 +0530
Re: what is wrong with d.clear()? Rustom Mody <rustompmody@gmail.com> - 2014-12-24 04:21 -0800
Re: what is wrong with d.clear()? shawool <shawool@gmail.com> - 2014-12-24 20:53 +0530
Re: what is wrong with d.clear()? Rustom Mody <rustompmody@gmail.com> - 2014-12-24 07:51 -0800
Re: what is wrong with d.clear()? Ian Kelly <ian.g.kelly@gmail.com> - 2014-12-25 21:38 -0700
Re: what is wrong with d.clear()? Dave Angel <davea@davea.name> - 2014-12-23 15:15 -0500
Re: what is wrong with d.clear()? alister <alister.nospam.ware@ntlworld.com> - 2014-12-23 21:08 +0000
Sending plain text messages (was: what is wrong with d.clear()?) Ben Finney <ben+python@benfinney.id.au> - 2014-12-24 08:31 +1100
Re: Sending plain text messages (was: what is wrong with d.clear()?) alister <alister.nospam.ware@ntlworld.com> - 2014-12-23 22:15 +0000
Re: Sending plain text messages (was: what is wrong with d.clear()?) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-12-24 13:23 +1100
Re: Sending plain text messages (was: what is wrong with d.clear()?) alister <alister.nospam.ware@ntlworld.com> - 2014-12-24 11:42 +0000
Re: what is wrong with d.clear()? Chris Angelico <rosuav@gmail.com> - 2014-12-24 09:31 +1100
Re: what is wrong with d.clear()? alister <alister.nospam.ware@ntlworld.com> - 2014-12-23 22:38 +0000
Re: what is wrong with d.clear()? Chris Angelico <rosuav@gmail.com> - 2014-12-24 09:44 +1100
Sending plain text messages (was: what is wrong with d.clear()?) Ben Finney <ben+python@benfinney.id.au> - 2014-12-24 08:08 +1100
[OT]Re: what is wrong with d.clear()? m <mvoicem@gmail.com> - 2015-03-06 00:05 +0100
Re: what is wrong with d.clear()? Terry Reedy <tjreedy@udel.edu> - 2015-03-05 16:34 -0500
Re: what is wrong with d.clear()? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-12-23 13:27 +1100
csiph-web