On Mon, Sep 14, 2009 at 1:12 AM, Sean DiZazzo half.ital...@gmail.com wrote:
Thanks for your explanation Steven. I see how it can be valuable, but
it seems to always break the second rule of Zen. I don't really want
to get into the code of debuggers, but I guess I can see how they
might have
On Sep 18, 9:55 am, Simon Forman sajmik...@gmail.com wrote:
On Mon, Sep 14, 2009 at 1:12 AM, Sean DiZazzo half.ital...@gmail.com wrote:
Thanks for your explanation Steven. I see how it can be valuable, but
it seems to always break the second rule of Zen. I don't really want
to get into
Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
s...@viridian.paintbox escribió:
What I'm not clear about is under what circumstances locals() does
not produce the same result as vars() .
py help(vars)
Help on built-in function vars in module __builtin__:
vars(...)
vars([object]) -
On 09/14/2009 08:36 AM, Sean DiZazzo wrote:
I have never used a call to locals() in my code. Can you show me a
use case where it is valuable and Pythonic?
You've received other answers, but just purely from the 'zen' perspective, there
is a nice clean yin/yan symmetry about globals() Vs
Sion Arrowsmith wrote:
Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
s...@viridian.paintbox escribi�:
What I'm not clear about is under what circumstances locals() does
not produce the same result as vars() .
py help(vars)
Help on built-in function vars in module __builtin__:
vars(...)
En Tue, 15 Sep 2009 11:18:35 -0300, Sion Arrowsmith
s...@viridian.paintbox escribió:
Sean DiZazzo half.ital...@gmail.com wrote:
What I'm not clear about is under what circumstances locals() does
not produce the same result as vars() .
py help(vars)
Help on built-in function vars in module
On Sep 15, 11:41 am, Gabriel Genellina gagsl-...@yahoo.com.ar
wrote:
En Tue, 15 Sep 2009 11:18:35 -0300, Sion Arrowsmith
s...@viridian.paintbox escribió:
Sean DiZazzo half.ital...@gmail.com wrote:
What I'm not clear about is under what circumstances locals() does
not produce the same
Given that python is devoid of types: Is the variable 'a' an int or a
float at runtime?, explicit can only be taken so far.
Personally, I use locals() when I work with Django.
On Mon, Sep 14, 2009 at 7:42 AM, Sean DiZazzo half.ital...@gmail.com wrote:
If you are willing to open your mind to
I have never used a call to locals() in my code. Can you show me a
use case where it is valuable and Pythonic?
def print_item(item):
description = textwrap.fill(item.description, 40)
short = item.description.split('\n', 1)[0]
code = str(item.id).zfill(6)
print
On Sep 13, 9:11 pm, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
On Sun, 13 Sep 2009 20:26:06 -0700, Sean DiZazzo wrote:
On Sep 13, 8:18 pm, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
On Sun, 13 Sep 2009 20:06:51 -0700, Sean DiZazzo wrote:
I have never
On Sep 13, 9:54 pm, Sean DiZazzo half.ital...@gmail.com wrote:
I have never used a call to locals() in my code. Can you show me a
use case where it is valuable and Pythonic?
def print_item(item):
description = textwrap.fill(item.description, 40)
short =
On Sep 13, 10:15 pm, Carl Banks pavlovevide...@gmail.com wrote:
Gabrielle's
Whoops, very sorry about that typo, just how it rolled of the
fingers. Ugh.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
If you are willing to open your mind to the possibility that some
Pythonic things don't adhere to every Zen, then I would suggest that
Gabrielle's examples are perfectly Pythonic shortcuts. But if you
don't want to use them, you don't have to, nobody is forcing you.
It's a pretty small
13 matches
Mail list logo