Bob's a very highly respected member of this group, and I suggest you try
not to insult the people you're asking for help.He's spot-on with the
intention of this mailing list. We aren't here to do work for you.
I, for one, am making it a point not to answer any of your queries in the
future. So t
> I would like to create a program which
> should repeat a simply string several times with list number before.
> Like "1. Wanna more. 2. Wanna more. ..."
> Suppose to a loop here repeating, say x times. Should it look like that:
>
> y="Wanna more. "
> x=1
> x=x+d:
> d=<100
> print d+y
>
> How to c
Oxymoron wrote:
> While having an assignment as an expression could be convenient in
> places (I have had my moments where I wish it was!), that particular
> usage is also a source of common bugs. Often in conditional statements
Me, too. I grumble every time I have to take two separate statements
"wesley chun" wrote in message
[snip]
... however, there is a tiny bug: if the $HOME
environment variable is *not* set, you will get a KeyError exception.
one solution is to add a default value to your get() method call so
that it returns an object with a Boolean False value:
No KeyError. D
Corey, please reply on list (use reply-all). I know it's annoying to have
to remember that.
-- Forwarded message --
From: Corey Richardson
Date: Thu, Oct 1, 2009 at 4:15 AM
Subject: Re: [Tutor] UnboundLocalError and Break
To: Luke Paireepinart
Luke Paireepinart wrote:
You're
(Did not reply to list earlier, apologies)
On Sat, Oct 3, 2009 at 7:47 PM, Didar Hossain wrote:
> >>> There are probably various syntactic tricks to achieve the same,
> however,
> >>> the main reason you can't do it is that assignment in Python is a
> statement
> >>> rather than an expression, i.
On Sat, Oct 3, 2009 at 1:34 PM, Rich Lovely wrote:
> 2009/10/3 wesley chun :
>> On Fri, Oct 2, 2009 at 11:14 PM, Oxymoron wrote:
>>> Hello,
>>>
>>> On Sat, Oct 3, 2009 at 3:56 PM, Didar Hossain
>>> wrote:
homedir = os.environ.get('HOME')
if homedir:
print "My home dir
Ok ok, smarty! Don't be very cool! Nobody asks you a favor, nobody
asks your advices as well. There are plenty 'advisers' to say where to
see, but not too much able to explain. Keep quiet.
Regards,
Andrius
On 02/10/2009, bob gailer wrote:
> Andrius wrote:
>> Hi!
>>
>> There are interesting onli
2009/10/3 wesley chun :
> On Fri, Oct 2, 2009 at 11:14 PM, Oxymoron wrote:
>> Hello,
>>
>> On Sat, Oct 3, 2009 at 3:56 PM, Didar Hossain
>> wrote:
>>>
>>> homedir = os.environ.get('HOME')
>>>
>>> if homedir:
>>> print "My home directory is %s" % homedir
>>>
>>>
>>> I do this in Perl -
>>>
>>>