> I can't believe the code editing situation today is in a such sorry
> state.
I can't believe an old coder is feeling so sorry for himself.
> Today, I tried to understand the twisted.web.client code and I found 3
> methods I couldn't find by who were called.
>
> I asked on the mailing list and t
[In re R. Hettinger's critiques]
> * it extends the language with arcane syntax tricks...
I think most of these in the current version of J. Bronson's "bidict"
can be left unused, or removed altogether. In almost all cases, a
bidict should be accessed as an ordinary python dict.
> * we've alrea
I was really inspired by this discussion thread! :-)
After much tinkering, I think I have a simpler solution. Just make
the inverse mapping accessible via an attribute, -AND- bind the
inverse of -THAT- mapping back to the original. The result is a
python dict with NO NEW METHODS except this inve
Hmmm. I am trying some algorithms, and timeit reports that a
list.extend variant is fastest... WTH?! Really this seems like it
must be a "bug" in implementing the "[None]*x" idiom.
As expected, appending one-at-a-time is slowest (by an order of
magnitude):
% python -m timeit -s "N=100" \
> I would like to propose that it be made impossible in the Python
> source to import two instances of the same module.
A fully-automatic solution is more difficult than it might seem at
first:
http://www.python.org/dev/peps/pep-0328/
But there is a simple code-discipline solution: never ever us
On Jun 11, 6:23 pm, Mensanator wrote:
> Removing the duplicates could be a big problem.
It is fairly easy to ignore duplicates in a sorted list:
from itertools import groupby
def unique(ordered):
"""Yield the unique elements from a sorted iterable.
"""
for key,_ in groupby(ordered):
Scheme is arguably the programming language with the most support for
recursion, including the most complete support for tail-call
optimization, constructs like "letrec" to define collections of
multiply-recursive functions (which get used very frequently -- by no
means is it an uncommon situation,