;HOME']],
ancestors(os.path.realpath('.'))):
modules_dir = os.path.join(dir, 'modules')
if os.path.exists(modules_dir):
sys.path.insert(0,modules_dir)
from foo import foo
break
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
A SAX parser can notify a text node by calling any number of times the
characters method so you need to accumulate all the information you
receive on the characters method and output the text when you get a
notification different than characters.
Best Regards,
George
ot;I don't write _ so I don't need
[whatever language feature enables writing it]". It is important,
however, to be aware of the limitation and make your choice
deliberately.
George
--
for email reply remove "/" from address
--
http://mail.python.org/mailman/listinfo/python-list
ommon util.py in a package called "globals".
That could get really confusing. You might make it a standalone
package, or maybe use "utilities" or "common".
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
but TurboGears uses json-py.
https://sourceforge.net/projects/json-py/
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
fter language, decade
after decade, platform after platform. Use your brain cells form
something useful, like learning new technologies and new
algorithms.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
you need more than csv, start writing to to
the OpenOffice.org formats, either with your own code or via PyUNO.
Then use OOo itself or a MS-sponsored ODF reader to translate to Excel
format. This should be a maintainable approach over time (but a lot
more complex than just csv).
--
Harry George
nix. YMMV
>
> Peace,
> ~Simon
>
I agree with this-- just try it. When I've helped others move code, I
found the biggest problem was when they had hardcoded file paths instead of
using os.path mechanisms.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
01 603 604 PPC64 620 A35
PWR4 PWR5 970 PPC970 PWR6 ANY
export OBJECT_MODE=64
cd $TOOLS/src/Python-2.5-cc
./configure --prefix=$TOOLS/Python-2.5-cc --with-gcc="xlc_r -q64"
--with-cxx="xlC_r -q64" --disable-ipv6 AR="ar -X64"
George
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Robert Hicks wrote:
> > [EMAIL PROTECTED] wrote:
> > > T. Bryan wrote:
> > > > Thomas Heller wrote:
> > > >
> > > > > I cannot connect to starship.python.net: neither http, nor can I login
> > > > > interactively with ssl (and the host key seems to have changed as
> > >
()
The same works as is on modifying individual instances, rather than
their class:
def test2():
o = C3()
addMethod(C2.m, o)
addMethod(C1.v, o)
o.m()
# raises AttributeError
# C3().m()
George
--
http://mail.python.org/mailman/listinfo/python-list
on.
> So based on the files above, I want returned:
> state
> district
> province
def extract(s):
return s[s.rfind('_')+1:s.rfind('.')]
George
--
http://mail.python.org/mailman/listinfo/python-list
def make_class(clsname, bases, dict):
for name,default in chain(izip(names, repeat(127)),
defaulted_names.iteritems()):
assert name not in dict # sanity check
dict[name] = byte_property('_'+name, default)
return type(clsname,bases,dict)
return make_class
class RC(object):
__metaclass__ = ByteProperties('pwm01', pwm02=64)
rc = RC()
print rc.pwm01, rc.pwm02 # 127 64
rc.pwm01 = 1312
print rc.pwm01, rc.pwm02 # 32 64
George
--
http://mail.python.org/mailman/listinfo/python-list
clsdict[sym] = property(_get,_set)
> return type.__new__(metatype,name,bases,clsdict)
>
> class RC(object):
> __metaclass__ = mod256metatype
> __mod256__ = ["pwm01","pwm02"]
There's a subtle common bug here: all _get and _set clo
ames, don't copy and paste this all over the place; use a
decorator instead so that you can just write:
class test(object):
@print_name
def a_method(self,this,that):
pass
@print_name
def b_method(self,this,that):
pass
The definition of print_name is lef
the docs didn't make clear if it is possible.
Thanks,
George
--
http://mail.python.org/mailman/listinfo/python-list
Robert Kern wrote:
> George Sakkis wrote:
> > Is there a way to handle numeric (or numarray or numpy) arrays as sets
> > and compute efficiently their intersection, union, etc. ? I hope there
> > is a faster way than s = array(set(A) & set(B)). Can this be done with
>
Does "remove my unix-think" mean replacing it with equivalent
Windows-think (e.g through Win32all, Win32 API, COM) or it can be done
in platform-independent way ? In the second case I might be able to
help as I'm using SpamBayes with Outlook at work, but I don't do
windows
objects.
A notable exception are numarray arrays (probably true for numpy too, I
haven't tested it though):
>>> from numarray import array
>>> bool(array([1,2]))
Traceback (most recent call last):
File "", line 1, in ?
RuntimeError: An array doesn't make sense as a truth value. Use any(a)
or all(a).
George
--
http://mail.python.org/mailman/listinfo/python-list
take days to finish normally, so I want it
to run overnight too. Any hints ?
Thanks,
George
--
http://mail.python.org/mailman/listinfo/python-list
all the customizing that I could never figure out.
years ago this worked for people I was supporting:
set softtabstop=4 shiftwidth=4 expandtab
Personally, I'm an emacs guy, so I wouldn't know.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
s for Ubuntu, which I'd
gladly do if it was up to me).
By the way, it would be great if numpy's mailing list was mirrored to a
google group; sourceforge and gmane are just horrible to use.
Best regards,
George
--
http://mail.python.org/mailman/listinfo/python-list
Robert Kern wrote:
> George Sakkis wrote:
> > ImportError:
> > /usr/local/lib/python2.4/site-packages/numpy/linalg/lapack_lite.so:
> > undefined symbol: zheevd_
> >
> > Googling for "undefined symbol: zheevd_" returned no hits, at which
> > point
instead.
2. If there must be human-in-the-loop, then it is good to use a markup
language which can be converted to html (or to other backends).
Perrl's POD format is one, and I've done that as a Pdx.
http://www.seanet.com/~hgg9140/comp/index.html
http://www.seanet.com/~hgg91
round csv.reader that does all this ?
Thanks,
George
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> George> It occured to me that most times I read a csv file, I'm often
> George> doing from scratch things like assigning labels to columns,
> George> mapping fields to the appropriate type, ignoring some fields,
> George> changin
ering will also be faster, as for each record you just
have to do a bitwise AND with the 0..010...0 mask corresponding to a
given month.
George
--
http://mail.python.org/mailman/listinfo/python-list
7;Aslib'), ('JDOC', 'jdoc')]
>
> I would like to do
>
> [line for line in table if line[7] in ('JDOC','jdoc','Aslib','ASLIB')]
>
> so how should I get from
> {'a':('ASLIB','Aslib'),'j':('JDOC','jdoc')}
> to
> ('Aslib','ASLIB','JDOC','jdoc')
Meet itertools:
from itertools import chain
names = set(chain(*r.itervalues()))
print [line for line in table if line[7] in names]
George
--
http://mail.python.org/mailman/listinfo/python-list
nice xml dump of the object which isn't necessarily
reversible. Here's the output for your example:
3
4
3
5
11
12
3
2
If you find it suits you better, I'll try to make it available
somewhere (probably in the cookbook).
George
--
http://mail.python.org/mailman/listinfo/python-list
le as pickle
Set.__reduce__ = lambda self: (set, (self._data,))
s = Set([1,2,3])
x = pickle.dumps(s)
print pickle.loads(x)
This doesn't work though if you have already pickled the Set before
replacing its __reduce__, so it may not necessarily be what you want.
If there is a way around it, I'd like to know it.
George
--
http://mail.python.org/mailman/listinfo/python-list
how are BMWs not the same with Yugos ?
both have four wheels and burn gasoline.
--
http://mail.python.org/mailman/listinfo/python-list
ckages is ok. A web
page simple listing the third party sites and the recommended
downloads is ok. Automatically downloading is not ok.
Is there some way in the eggs mechanism to just get a list of the
proposed downloads, and let the user take the actions manually?
--
Harry George
PLM Engineering A
d_walk(*args, **kwds)
# more commands
def _specialized_walk(self, *args):
raise NotImplementedError
class UnipedalCreature(Creature):
def _specialized_walk(self, *args, **kwds):
# blahblah
class BipedalCreature(Creature):
def _specialized_walk(self, *args, **kwds):
# blahblah
s question, your approach is totally reasonable and
well-known; the csv.Dialect class for example is exactly this, a
parameter-holding class.
George
--
http://mail.python.org/mailman/listinfo/python-list
usually both faster and more elegant for array manipulations than
pure python.
George
--
http://mail.python.org/mailman/listinfo/python-list
ge(5) + range(7,9)
assert list(irange(5) + irange(7,9)) == s
assert list(irange(5) + range(7,9)) == s
assert list(range(5) + irange(7,9)) == s
s = range(5) * 3
assert list(irange(5) * 3) == s
assert list(3 * irange(5)) == s
George
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> George Sakkis wrote:
>
> > The base object class would be one candidate, similarly to the way
> > __nonzero__ is defined to use __len__, or __contains__ to use __iter__.
> >
> > Alternatively, iter() could be a wrapper type (or perhaps mi
Carl Banks wrote:
> George Sakkis wrote:
> > Fredrik Lundh wrote:
> >
> > > George Sakkis wrote:
> > >
> > > > The base object class would be one candidate, similarly to the way
> > > > __nonzero__ is defined to use __len__, or __contai
ctor, that is easy too.
c) Peer code reviews are easy -- both you and the reviewers can
understand the code's intent at a glance.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
e I used... never bothered to deal with java's
verbosity after that. It's a pity that jython resembles abandon-ware
these days, when jRuby showed up pretty recently and is gaining in
penetration with the java crowd. It will be a non-trivial loss for
python if it is left behind in the JVM world (at least if the latter is
not swallowed by the .NET dark forces, which doesn't seem to happen any
time soon ;-).
George
--
http://mail.python.org/mailman/listinfo/python-list
ally change Java's
architecture. It is still a closed world of reinvent-the-wheel,
my-way-or-the-highway. Which is antithetical to Python's promiscuous
interface-with-anything approach.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
raries (as
> > jar files) into CPython.
>
> http://sourceforge.net/projects/jpype
>
>
>
Personally, I've never gotten jpype to work. Is it just me, or is it
a troublesome install?
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
Java has layers upon layers upon layers of idiosyncratic
libraries and idioms. When you write bindings to that world (even if
the bindings are generated automagically), you have to *think* in
those same layers. The Python-oriented developer suddenly has to use
a dozen imports in order to do thing
Diez B. Roggisch wrote:
> George Sakkis schrieb:
> > Diez B. Roggisch wrote:
> >> Dr. Pastor schrieb:
> >>> I need a row of 127 bytes that I will use as a
> >>> circular buffer. Into the bytes (at unspecified times)
> >>> a mark (0 >>&g
u don't have to start from scratch: http://mondrian.sourceforge.net.
George
--
http://mail.python.org/mailman/listinfo/python-list
7;@')])"
>
Do projects at home. Either find an existing OSS project, or roll
your own. Once you have the basics of the language, the skills are
domain-specific: XML, GUIs, CAD, gaming, multithreading, numerical
analysis, natural language progromming, etc.
If you do an existing project, then you benefit from peer reviews and
other informal learning opportunities.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
e; OTOH having all imports at
the top of the module makes easier to see the module's dependencies
without grep'ing for import (that's especially useful for non-standard
imported modules or new additions ot the std lib if backwards
compatibility is an issue).
George
--
http://mail.python.org/mailman/listinfo/python-list
that I have to do it from scratch.
>
>
>
> Is there any open source charting tool that help me create charts in JPG or
> gif format?
>
>
>
> Thanks,
>
> Alan
>
>
See pygdchart
http://www.nullcube.com/software/pygdchart.html
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
our data sinks.
4. Do you have a testsuite and test harness? Put together your test
harness, then develop for the simplest case, then add complexity.
E.g., no FK, FK with 1 attr, FK with multiple attrs, FKs with
shared attrs.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
sting. Will it be related at all to OLAP or the
Multi-Dimensional eXpressions language
(http://msdn2.microsoft.com/en-us/library/ms145506.aspx) ?
George
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> George Sakkis wrote:
> > [EMAIL PROTECTED] wrote:
> >
> > > However, I'm designing another library for
> > > managing multi-dimensional arrays of data. Its purpose is similiar to
> > > that of a spreadsheet - analyze
D<--- EmailID ID
subjectLabelID ---> name
... ...
Then you can associate mails to labels by joining all three tables
together on the IDs. Of course you can implement this in memory as well
but you should probably want to store them in so
f 'URL=/media' in line :
icon = instream.filename()
dvc = line[11:-1]
break
Btw, you can delete a file or directory with os.unlink and os.rmdir,
respectively; no need for os.system.
George
--
http://mail.python.org/mailman/listinfo/python-list
air's policy
would be unprovable supposition at the time of the writing (as would
Blair's own) and would therefore not be libelous. However, if your
opinion took an accusatory tone saying, for example, that he was
increasing the public deficit to line his pockets, then you had better
be right.
George
--
for email reply remove "/" from address
--
http://mail.python.org/mailman/listinfo/python-list
o the "old way". Good to know that I can safely get rid
of practically all super() calls. Any python-dev-er's take on super()'s
utility and future in Py3K ?
George
--
http://mail.python.org/mailman/listinfo/python-list
> gives you the below in the right order...
Or even better in 2.4 or later:
sorted([a,b,c], key=len)
George
--
http://mail.python.org/mailman/listinfo/python-list
else ;)
> If you have comma separated list '1,,2'.split(',') naturally returns
> ['1', '', '2']. I think you can get what you want with a simple regexp.
No need for regexp in this case, just use None to specify one or more
whitespace chars as
without such constructs, and use the profiler to find out.
It shouldn't come as a surprise if it turns out to be slower, since the
nested function is redefined every time the outer is called. If you
actually call the outer function a lot, you'd better profile it.
George
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth wrote:
> Fredrik Lundh wrote:
>
> > George Sakkis wrote:
> >
> >> It shouldn't come as a surprise if it turns out to be slower, since
> >> the nested function is redefined every time the outer is called.
> >
> > except that it i
nor new style instances if __getstate__
returns a false valse, without any further justification. Any pointers
on the rationale for making a special case just out of the blue ?
George
--
http://mail.python.org/mailman/listinfo/python-list
a wrote:
> subway is pythons ruby on rails competitor
> pls tell me if u hav any expereinces
> thanks
u wanna know reils n subway ur so kewl omg! no expereinces watsoevah,
sori dud
PS: If you want to be taken seriously, put at least some effort to make
a readable english sentence. This is comp.
I am, however, going to ask what
information you think type inference can provide that substitutes for
algorithm or data structure exploration.
George
--
for email reply remove "/" from address
--
http://mail.python.org/mailman/listinfo/python-list
On 19 Jun 2006 13:53:01 +0200, [EMAIL PROTECTED] (Torben Ægidius
Mogensen) wrote:
>George Neuner writes:
>
>> On 19 Jun 2006 10:19:05 +0200, [EMAIL PROTECTED] (Torben Ægidius
>> Mogensen) wrote:
>
>> >I expect a lot of the exploration you do with incomplete progr
elf,inspect.ismethod):
if name.startswith('dump_'):
method()
def dump_f(self):
print 'The test method'
def dump_g(self):
print 'Hello user'
if __name__ == '__main__':
Foo()
George
--
http://mail.python.org/mailman/listinfo/python-list
R.
>
> Cheers,
> Bryan Rasmussen
Harvestman (http://harvestman.freezope.org/) is your best bet.
George
--
http://mail.python.org/mailman/listinfo/python-list
e often than not handled as scalars although they are typically
iterables. Also tuples may or may not be considered as iterables,
depending on what they are used for. The definition of scalar is
application-dependent, that's why there is not an isscalar() builtin.
George
--
http://mail.python.org/mailman/listinfo/python-list
s. The runtime computation of an illegal index
value is not prevented by narrowing subtypes and cannot be statically
checked.
George
--
for email reply remove "/" from address
--
http://mail.python.org/mailman/listinfo/python-list
David Hirschfield wrote:
> Having email trouble...
>
Having bathroom trouble... can I help myself at your house entrance ?
Didn't think so...
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 21 Jun 2006 16:12:48 + (UTC), Dimitri Maziuk
<[EMAIL PROTECTED]> wrote:
>George Neuner sez:
>> On Mon, 19 Jun 2006 22:02:55 + (UTC), Dimitri Maziuk
>><[EMAIL PROTECTED]> wrote:
>>
>>>Yet Another Dan sez:
>>>
>>>... Requ
p://okmij.org/ftp/Haskell/types.html#branding
That was interesting, but the authors' method still involves runtime
checking of the array bounds. IMO, all they really succeeded in doing
was turning the original recursion into CPS and making the code a
little bit clearer.
George
--
for ema
"Both remote (PC-based) and autonomous (robot-based) execution
scenarios can be developed using a selection of programming languages,
including those in Microsoft Visual Studio® and Microsoft Visual
Studio Express languages (Visual C#® and Visual Basic® .NET),
JScript® and Microsoft IronPython 1.0
hen Guido's planning to work that stuff into Python? The last post
> I noticed from him on the topic was from 2005. At least back then he
> sounded pretty into it.
I wouldn't count on it if I was to start a project sometime soon.
George
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers wrote:
> George Sakkis a écrit :
> > This is ok - in theory. In practice I've found that e.g. strings are
> > more often than not handled as scalars although they are typically
> > iterables.
> >>> hasattr('', '__ite
kinda defeats the purpose of
> the negative subscripts anyway.
>
> Is there some magic I'm missing here? Wouldn't it actually be better for
> Python to treat 0 as a special case here, so that x[-2:0] and x[-2:]
> generated the same result?
>
> --Tim
x[-2:None]
I
Dennis Lee Bieber wrote:
> On 22 Jun 2006 16:48:47 -0700, "George Sakkis" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > What does __setitem__ have to do with iterability ?
>
> It confirms that the object is indexable, and muta
Dennis Lee Bieber wrote:
> On 22 Jun 2006 22:55:00 -0700, "George Sakkis" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
> > Ok, I'll try once more: What does __setitem__ have to do with
> > **iterability**, not mutability or i
I'm trying to use mechanize to fill in a "find a flight" form and then
get back the results, but I'm not sure how to make it wait until the
results page appears; the response after submitting the form is the
"please wait while we are searching for your flights" page.
o a waiting page, hopefully I can figure
them out once I have one working.
George
> George Sakkis wrote:
> > I'm trying to use mechanize to fill in a "find a flight" form and then
> > get back the results, but I'm not sure how to make it wait until the
> > result
implement. By then
you should have a much better idea of what modules to look for.
George
--
http://mail.python.org/mailman/listinfo/python-list
r complete. Again, implementations went in
both directions. Some allowed either method by switch, but the type
compatibility issue continued to plague Pascal until standard
conforming compilers emerged in the mid 80's.
George
--
for email reply remove "/" from address
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 25 Jun 2006 13:42:45 +0200, Joachim Durchholz
<[EMAIL PROTECTED]> wrote:
>George Neuner schrieb:
>> The point is really that the checks that prevent these things must be
>> performed at runtime and can't be prevented by any practical type
>> analysis perfo
On Sun, 25 Jun 2006 14:28:22 -0600, Chris Smith <[EMAIL PROTECTED]>
wrote:
>George Neuner wrote:
>> >Undecidability can always be avoided by adding annotations, but of
>> >course that would be gross overkill in the case of index type widening.
>>
>>
On Mon, 26 Jun 2006 13:02:33 -0600, Chris Smith <[EMAIL PROTECTED]>
wrote:
>George Neuner wrote:
>
>> I worked in signal and image processing for many years and those are
>> places where narrowing conversions are used all the time - in the form
>> of floating
using the embedding
libraries and bindings.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
static type
checker does the conversion automatically, then obviously types are
not static and can be changed at runtime.
Either way you've failed to prevent a runtime problem using a purely
static analysis.
George
--
for email reply remove "/" from address
--
http://mail.python.org/mailman/listinfo/python-list
is Smith's
assertions to the contrary).
It seems to me that the code complexity of such a super-duper
inferencing system would make its bug free implementation quite
difficult and I personally would be less inclined to trust a compiler
that used it than one having a less capable (but easie
samir wrote:
> Saluton!
>
> Being a fond of Python, I had this idea: Why not making Python a Unix
> shell?
It's been done; it's called "IPython":
http://ipython.scipy.org/doc/manual/manual.html
George
--
http://mail.python.org/mailman/listinfo/python-list
oll one on your own, e.g. using a
recursive generator; in fact, if you had searched for "flatten" in the
google group of c.l.py, you'd find this: http://tinyurl.com/ndobk
George
--
http://mail.python.org/mailman/listinfo/python-list
the bill:
http://aspn.activestate.com/ASPN/search?query=progress+bar&x=0&y=0§ion=PYTHONCKBK&type=Subsection
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
in x:
for subelem in flatten(elem):
yield subelem
Or if you want to modify the argument list in place, as in Neil's
solution:
def flatten_in_place(x):
x[:] = flatten(x)
George
--
http://mail.python.org/mailman/listinfo/python-list
Jean-Paul Calderone wrote:
> On 3 Sep 2006 09:20:49 -0700, [EMAIL PROTECTED] wrote:
> >Are you using the str.isspace() method? I don't use it, so if most
> >people don't uses it, then it may be removed from Py 3.0.
> >
> >I usually need to know if a string contains some non-spaces (not space
> >cl
; with 'b':
>
> x = map(lambda foo: foo.replace('a', 'b'), x)
Or more pythonically:
x = [s.replace('a', 'b') for s in x]
George
--
http://mail.python.org/mailman/listinfo/python-list
s?
>
> Thanks,
> Alan Isaac
Numeric/Numpy is ideal for this:
from Numeric import array
def slicelist(nestedlist,index):
a = array(nestedlist,'O')
# return the slice a[:,:,...,:,index]
fullindex = [slice(None)] * len(a.shape)
fullindex[-1] = index
return a[fullindex].tolist()
George
--
http://mail.python.org/mailman/listinfo/python-list
ber not in [1,20]), handle the second one as "Do_C" instead of
raising ValueError.
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
Neil Cerutti wrote:
> On 2006-09-04, George Sakkis <[EMAIL PROTECTED]> wrote:
> > x=raw_input('\nType a number from 1 to 20')
> > try:
> > x = int(x)
> > if x<1 or x>20: raise ValueError()
> > except ValueError:
> > D
>>> y = x
>>> x = [s.replace('a', 'b') for s in x] # rebind to new list
>>> y is x
False
2)
>>> x = ["a","123a","as"]
>>> y = x
>>> x[:] = [s.replace('a', 'b')
ld buf
s = " this . is a . test to . check if it . works . well . it looks .
like ."
for p in chunker(s.split(), keep_last=True, keep_first=True):
print p
George
--
http://mail.python.org/mailman/listinfo/python-list
Michael Spencer wrote:
> George Sakkis wrote:
> > Michael Spencer wrote:
> >
> >> Here's a small update to the generator that allows optional handling of
> >> the head
> >> and the tail:
> >>
> >> def chunker(s, chun
; It could be written as::
Sure, it *could*; whether it *should* is a different issue. I can't
imagine a case for absolute *need* of lambda, but there are several
cases where it is probably the best way, such as the one of this
thread.
George
--
http://mail.python.org/mailman/listinfo/python-list
ve objects rather than
> 'small code snippets'. Requiring source code input and passing arguments by
> string substitution makes it too painful for interactive work. The need to
> specify the number of repeats is an additional annoyance.
timeit is indeed somewhat cumbersome
401 - 500 of 1560 matches
Mail list logo