In article mailman.2257.1237534775.11746.python-l...@python.org,
Hendrik van Rooyen m...@microcorp.co.za wrote:
Aahz a...@pyft.com wrote:
8
.. Because the name Python is derived from the
comedy TV show Monty Python, stupid
On Mar 18, 12:30 pm, Kottiyath n.kottiy...@gmail.com wrote:
When we say readability counts over complexity, how do we define what
level of complexity is ok?
[snip= mommie can i go out an play?]
How do we decide whether a level of complexity is Ok or not?
Hmm?
How did you know what shoes to
provided us with the tools to answer how complex an algorithm is
and to compare its complexity to another algorithm. whoever wants to
deal with issues of complexity might want to start there.
knowing the complexity of an algorithm provides a starting point for
answering whether the level
ja...@biosci.utexas.edu writes:
donald knuth's anaylses of the computational complexity of algorithms
I think the question was about how intricate the algorithm was (this
affects its difficulty of implementation and understanding), not its
computational complexity.
--
thanks, paul.
if i understand correctly, questions about about how intricate [an]
algorithm [is] (this affects its difficulty of implementation and
understanding) are also fair and deserve fair answers.
again, if i understand correctly, this issue gets its share of
attention in computer
ja...@biosci.utexas.edu writes:
again, if i understand correctly, this issue gets its share of
attention in computer sciences, and cs teachers discuss it in class,
passing along their own appreciation of it to their students.
I think that question has nothing to do with CS (basically a
thanks, paul.
again, since i don't know the context of the original question, i may
be speaking to something different than the original post; however,
questions about about how intricate [an] algorithm [is] (this affects
its difficulty of implementation and understanding) are indeed
Terry Reedy tjre...@udel.edu wrote:
Vito De Tullio wrote:
Tim Roberts wrote:
bearophileh...@lycos.com wrote:
In Python 3 those lines become shorter:
for k, v in a.items():
{k: v+1 for k, v in a.items()}
This is nonsensical. It creates and discards a complete new dict for
each
Aahz a...@pyft.com wrote:
8
.. Because the name Python is derived from the
comedy TV show Monty Python, stupid jokes are common in the Python
community.)
Sacrilege!
A joke based on the Monty Python series is BY DEFINITION
2009/3/20 Hendrik van Rooyen m...@microcorp.co.za:
A joke based on the Monty Python series is BY DEFINITION not stupid!
But may get /too/ silly.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
Tim Roberts wrote:
bearophileh...@lycos.com wrote:
In Python 3 those lines become shorter:
for k, v in a.items():
{k: v+1 for k, v in a.items()}
That's a syntax I have not seen in the 2-to-3 difference docs, so I'm not
familiar with it. How does that cause a to be updated?
I think he
Vito De Tullio wrote:
Tim Roberts wrote:
bearophileh...@lycos.com wrote:
In Python 3 those lines become shorter:
for k, v in a.items():
{k: v+1 for k, v in a.items()}
This is nonsensical. It creates and discards a complete new dict for
each item in the original dict. The reuse of names
When we say readability counts over complexity, how do we define what
level of complexity is ok?
For example:
Say I have dict a = {'a': 2, 'c': 4, 'b': 3}
I want to increment the values by 1 for all keys in the dictionary.
So, should we do:
for key in a:
... a[key] = a[key] + 1
or is it
On Mar 19, 11:29 am, Daniel Fetchinson fetchin...@googlemail.com
wrote:
When we say readability counts over complexity, how do we define what
level of complexity is ok?
For example:
Say I have dict a = {'a': 2, 'c': 4, 'b': 3}
I want to increment the values by 1 for all keys in the
On Thu, Mar 19, 2009 at 9:39 AM, Kottiyath n.kottiy...@gmail.com wrote:
I understand that my question was foolish, even for a newbie.
I will not ask any more such questions in the future.
--
http://mail.python.org/mailman/listinfo/python-list
I didn't think it was a foolish question, just
[posted and e-mailed]
In article 033514d1-e0e9-4a1c-bca0-846781f0d...@w35g2000prg.googlegroups.com,
Kottiyath n.kottiy...@gmail.com wrote:
On Mar 19, 11:29=A0am, Daniel Fetchinson fetchin...@googlemail.com
wrote:
Once every nuanced detail has been carefully weighed in and a
consensus has
On Mar 19, 4:39 am, Kottiyath n.kottiy...@gmail.com wrote:
I understand that my question was foolish, even for a newbie.
I will not ask any more such questions in the future.
Gaaah! Your question was just fine, a good question on coding style.
I wish more people would ask such questions so
On Mar 19, 8:42 pm, Paul McGuire pt...@austin.rr.com wrote:
On Mar 19, 4:39 am, Kottiyath n.kottiy...@gmail.com wrote:
I understand that my question was foolish, even for a newbie.
I will not ask any more such questions in the future.
Gaaah! Your question was just fine, a good question
On Mar 19, 9:33 pm, Kottiyath n.kottiy...@gmail.com wrote:
On Mar 19, 8:42 pm, Paul McGuire pt...@austin.rr.com wrote:
On Mar 19, 4:39 am, Kottiyath n.kottiy...@gmail.com wrote:
I understand that my question was foolish, even for a newbie.
I will not ask any more such questions in the
On Mar 19, 9:41 am, Kottiyath n.kottiy...@gmail.com wrote:
On Mar 19, 9:33 pm, Kottiyath n.kottiy...@gmail.com wrote:
On Mar 19, 8:42 pm, Paul McGuire pt...@austin.rr.com wrote:
On Mar 19, 4:39 am, Kottiyath n.kottiy...@gmail.com wrote:
I understand that my question was foolish,
On Mar 19, 1:25 pm, Paul Hildebrandt paul_hildebra...@yahoo.com
wrote:
On Mar 19, 9:41 am, Kottiyath n.kottiy...@gmail.com wrote:
On Mar 19, 9:33 pm, Kottiyath n.kottiy...@gmail.com wrote:
On Mar 19, 8:42 pm, Paul McGuire pt...@austin.rr.com wrote:
On Mar 19, 4:39 am, Kottiyath
I understand that my question was foolish, even for a newbie.
I will not ask any more such questions in the future.
Gaaah! Your question was just fine, a good question on coding style.
I wish more people would ask such questions so that bad habits could
be avoided.
The newbie posts that
When we say readability counts over complexity, how do we define what
level of complexity is ok?
For example:
Say I have dict a = {'a': 2, 'c': 4, 'b': 3}
I want to increment the values by 1 for all keys in the dictionary.
So, should we do:
for key in a:
... a[key] = a[key] + 1
or is it Ok to
Kottiyath:
How do we decide whether a level of complexity is Ok or not?
I don't understand your question, but here are better ways to do what
you do:
a = {'a': 2, 'c': 4, 'b': 3}
for k, v in a.iteritems():
... a[k] = v + 1
...
a
{'a': 3, 'c': 5, 'b': 4}
b = dict((k, v+1) for k, v in
On Mar 18, 1:30 pm, Kottiyath n.kottiy...@gmail.com wrote:
When we say readability counts over complexity, how do we define what
level of complexity is ok?
For example:
Say I have dict a = {'a': 2, 'c': 4, 'b': 3}
I want to increment the values by 1 for all keys in the dictionary.
So, should
On Mar 18, 1:30 pm, Kottiyath n.kottiy...@gmail.com wrote:
When we say readability counts over complexity, how do we define what
level of complexity is ok?
For example:
Say I have dict a = {'a': 2, 'c': 4, 'b': 3}
I want to increment the values by 1 for all keys in the dictionary.
So,
You realize of course that these two alternatives are not equivalent.
The first does what your problem statement describes, for each key in
a given dict, increments the corresponding value. The second creates
an entirely new dict with the modified values. Even if you were to
write the second one
On Wed, 18 Mar 2009 17:30:45 -, Kottiyath n.kottiy...@gmail.com
wrote:
When we say readability counts over complexity, how do we define what
level of complexity is ok?
We don't. There is no One True Way that defines for us what complexity
is, never mind how much of it is too much.
bearophileh...@lycos.com wrote:
In Python 3 those lines become shorter:
for k, v in a.items():
{k: v+1 for k, v in a.items()}
That's a syntax I have not seen in the 2-to-3 difference docs, so I'm not
familiar with it. How does that cause a to be updated?
--
Tim Roberts, t...@probo.com
29 matches
Mail list logo