Raymond Hettinger wrote:
I would like to get everyone's thoughts on two new dictionary methods:
def count(self, value, qty=1):
def appendlist(self, key, *values):
-1.0
When I need these, I just use subtype recipes. They seem way too
special-purpose for the base dict type.
class
John Willems wrote:
Interesting GUI developments, it seems. Anyone developed a Ajax
application using Python? Very curious
Not what you meant, perhaps, but http://weboggle.shackworks.com has a
Javascript/HTML/CSS one-page client that uses XMLHttpRequest to talk to
a Python back-end. The
zetasum wrote:
One Small step one infinite leap
I think this is what you're looking for:
import itertools
for x in itertools.chain('step', itertools.cycle('leap')):
print markov_chain_text(net_loon_compendium, seed=x)
Cheers,
Evan @ 4-am
--
In Python 2.4 the following works:
class G(dict):
... def __getitem__(self, k):
... return 'K' + k
...
g = G()
exec 'print x, y, z' in g
Kx Ky Kz
...while in Python 2.3 it fails with NameError: name 'x' is not defined.
Is this an accidental feature, or can I count on this working in
Jeremy Bowers wrote:
You know, Guido might as well give in now on the Macro issue. If he
doesn't come up with something himself, apparently we'll just hack
bytecode.
Ah, hacking bytecode isn't where it's at anymore. These days, you use
the compiler package and munge the AST. Hygenic!
That
I should clarify up front that I may have given an overblown sense of
how long the producer thread typically takes to generate a board; It's
usually a few tenths of a second, up to a few seconds for especially
fecund boards.
My concern was that even a few seconds is long enough for fifty
WEBoggle needs a new game board every three minutes. Boards take an
unpredictable (much less than 3min, but non-trivial) amount of time to
generate. The system is driven by web requests, and I don't want the
request that happens to trigger the need for the new board to have to
pay the time
Erik Max Francis wrote:
I've checked and all the feeds _I_ care about :-) are available in RSS
now, so it would make sense to move to an RSS aggregator if it has the
same features. I've looked around at some that are available, both in
Python and not, and haven't found anything that had the