Ulrich Dorda wrote:
I've got a probably embarrassing trivial problem with namespaces, but
couldn't solve it myself nor find an answer in the net. Hopefully one of
you guys can help me.
What I want to do:
Use the interactive shell and e.g define the variable a there.
Then load a module and acce
Boris Ozegovic wrote:
> Paul Rubin wrote:
>
>> if any(x[0]==element[0] for x in a):
>
> How come this list comprehension isn't in [] brackets?
It isn't list comprehension, it is generator expression
http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Generator_expressions
--
Tero
--
Jorge Godoy wrote:
> mario ruggier wrote:
>
>> Is there any way to tell between whether a keyword arg has been explicitly
>> specified (to the same value as the default for it) or not... For example:
>>
>> def func(key=None):
>> do something with key
>>
>> But the following two usages give sam
azrael wrote:
> lets supose i have a object
>
class a:
__init__(self,b):
self.b=b
>
object=a(2)
>
>
> how can I bind the object with "print". I supose that this should be
> possible with a constructor. but I don't know how.
>
print a
> 2
>
> Something like th
Neil Wallace wrote:
> On Thu, 25 Oct 2007 04:09:00 +, [EMAIL PROTECTED] wrote:
>
>> hi to everyone
>> I wondered if this might be the right place to ask for some ideas for
>> python project for university.
>> I'd like it to be something useful and web-based. And the project must
>> be complete
Gabriel Zachmann wrote:
> Well,
>
> could some kind soul please explain to me why the following trivial code
> is misbehaving?
>
>
> #!/usr/bin/python
> s = []
> l = [ 0 ]
> r = [0, 0]
> while r:
> x = (l,r)
> print x
> s.append( x )
> l.append( r.pop(0) )
> print s
>
>
>
> T
Evan Klitzke wrote:
> All,
>
> Mail messages should be wrapped at 78 characters (as suggested in RFC
> 2822). I want my python batch scripts/cron jobs to enforce this
> behavior, and format the mail that is sent out so that newline
> characters are inserted as appropriate to keep line lengths at 7