what is wrong with d.clear()?

2014-12-22 Thread shawool
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)

>>> 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 "", line 1, in 
>>> d
Traceback (most recent call last):
  File "", line 1, in 
>>> quit()
Traceback (most recent call last):
  File "", line 1, in 

Thanks in advance.

Best regards,
Shawool
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: what is wrong with d.clear()?

2014-12-23 Thread shawool
Thank you for answering my query.

Fonts and colors are reset to defaults now. Sorry for the inconvenience
caused.

Regards,
Shawool

On Tue, Dec 23, 2014 at 3:55 PM, Steve Hayes  wrote:

> On Tue, 23 Dec 2014 13:33:53 +1100, Steven D'Aprano
>  wrote:
>
> >Dave Angel wrote:
> >
> >> Or even better:  Don't use html email for forum messages.  It frequently
> >> messes up the colors, the font, the formatting (like indentation), or
> >> even prevents some people from even seeing and/or replying to the
> >> message.  Put the email program in text mode, and just send what you
> >> want people to see.
> >
> >
> >I agree, but alas the horse has bolted and the idiots have taken over.
> >
> >We cannot stop the great mass of people sending HTML mail, but there is no
> >reason why we have to *read* HTML email. Even today, most mail clients
> will
> >send a plain text part that contains the same content as the HTML part,
> and
> >any decent mail client can be set to prefer the plain text part in
> >preference to rendering the HTML.
> >
> >For those few cases where there is no plain text part[1], the better mail
> >clients (such as mutt) will include an option to dump the raw HTML to
> plain
> >text, minus all the tags.
> >
> >Last but not least, for the *vanishingly small* number of cases that has
> no
> >plain text part, and the formatting of the text dump is unreadable, or
> >where the formatting of the HTML is actually essential to understanding
> the
> >post, then you have a choice of pressing Delete on the message or
> rendering
> >the HTML. But rendering HTML should never be the default.
>
> I had a message, discussed in another NG, inviting me to look at someone's
> family tree on the web. It had no plain text version, and when I clicked on
> the relevant link, it crashed my mail reader.
>
> When I right-clicked on the link and tried to copy the URL to paste ibnto
> the
> address line of my web browser, it led to a "file not found" page.
>
> The HTML was enormously complex, and all they were supposed to be sending
> was
> a simple link.
>
> >[1] Or worse, one of those shitty messages that include a plain text part
> >that says "Your mail program cannot read this email. Please upgrade to a
> >better mail program."
>
> I usually reply to those saying "So why did you send it to me?"
>
> I suspect that in most cases the senders do not know that that is what
> their
> mail program is sending, and do it to let them know that their mesdsage
> could
> not be read.
>
>
> --
> Steve Hayes from Tshwane, South Africa
> Web:  http://www.khanya.org.za/stevesig.htm
> Blog: http://khanya.wordpress.com
> E-mail - see web page, or parse: shayes at dunelm full stop org full stop
> uk
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: what is wrong with d.clear()?

2014-12-24 Thread shawool
I was unable to find an option to disable HTML mode.
Thanks for letting me know how to enable plain text mode.
I just followed the steps and hopefully this message is in plain text format.

Regards,
Shawool


On Wed, Dec 24, 2014 at 5:51 PM, Rustom Mody  wrote:
> On Tuesday, December 23, 2014 6:30:30 PM UTC+5:30, shawool wrote:
>> Thank you for answering my query.
>>
>> Fonts and colors are reset to defaults now. Sorry for the inconvenience 
>> caused.
>>
>> Regards,
>> Shawool
>
> Sorry for the peevishness
> Are you using gmail?
> If so when you compose a message
> The compose window has little downward triangle
> In there there is a 'plain text' option
>
> You need to use that
>
> [I just use google groups]
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list