I ran into a phenomenon that seemed odd to me, while testing a
build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e.
test_builtin.py, for example, fails a couple of tests with errors
claiming that apparently identical floating point values aren't equal.
But it only does that when imported, and
On Fri, 8 Jul 2005 21:21:36 -0500, Alex Gittens [EMAIL PROTECTED] wrote:
I'm trying to define a function that prints fields of given widths
with specified alignments; to do so, I wrote some helper functions
nested inside of the print function itself. I'm getting an
UnboundLocalError, and after
On Fri, 08 Jul 2005 22:29:30 -0600, Steven Bethard [EMAIL PROTECTED] wrote:
Dennis Lee Bieber wrote:
On Fri, 08 Jul 2005 16:07:50 -0600, Steven Bethard
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
I only searched a few relatively recent threads in c.l.py, so there are
Leif K-Brooks wrote:
Kay Schluehr wrote:
list.from_str(abc)
list(a, b, c )
I assume we'll also have list.from_list, list.from_tuple,
list.from_genexp, list.from_xrange, etc.?
List from list isn't needed, nor list from tuple. That's what the * is
for. And for that matter neither is
Leif K-Brooks schrieb:
Kay Schluehr wrote:
list.from_str(abc)
list(a, b, c )
I assume we'll also have list.from_list, list.from_tuple,
list.from_genexp, list.from_xrange, etc.?
One might unify all those factory functions into a single
list.from_iter that dispatches to the right
Jacob Page wrote:
Thomas Lotze wrote:
Jacob Page wrote:
better-named,
Just a quick remark, without even having looked at it yet: the name is not
really descriptive and runs a chance of misleading people. The example I'm
thinking of is using zope.interface in the same project: it's
--- NickC [EMAIL PROTECTED] wrote:
I'd be very interested to hear your opinion on the 'namespace' module,
which looks at addressing some of these issues (the Record object, in
particular). The URL is http://namespace.python-hosting.com, and any
comments should be directed to the [EMAIL
Kirk Job Sluder schrieb:
Kay Schluehr [EMAIL PROTECTED] writes:
This might be a great self experience for some great hackers but just
annoying for others who used to work with modular standard librarys and
think that the border of the language and an application should be
somehow fixed
Jacob Page schrieb:
I have created what I think may be a useful Python module, but I'd like
to share it with the Python community to get feedback, i.e. if it's
Pythonic. If it's considered useful by Pythonistas, I'll see about
hosting it on Sourceforge or something like that. Is this a good
Scott David Daniels a écrit :
cantabile wrote:
bruno modulix a écrit :
You may want to have a look at the Factory pattern...
... demo of class Factory ...
Taking advantage of Python's dynamic nature, you could simply:
# similarly outrageously oversimplified dummy example
Does a call to file.readlines() reads all lines at once in the memory?
Are the any reasons, from the performance point of view, to prefer
*while* loop with readline() to *for* loop with readlines()?
--
http://mail.python.org/mailman/listinfo/python-list
vch wrote:
Does a call to file.readlines() reads all lines at once in the memory?
Are the any reasons, from the performance point of view, to prefer
*while* loop with readline() to *for* loop with readlines()?
Yes, and you just mentioned it. .readlines reads the entire file into
memory at
Erik Max Francis wrote:
... modern versions of
Python allow iteration over a file, which will read it line by line:
for line in aFile:
...
Thanks! Just what I need.
--
http://mail.python.org/mailman/listinfo/python-list
My initial proposal
(http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html) didn't
exactly get a warm welcome...
And Now for Something Completely Different:
class autoinit(object):
def __init__(self, *args, **keyword_args):
self.__dict__.update(
Hello,
IIRC there is a directory traverser for walking recursively through
subdirectories in the standard library. But I can't remember the name and
was unable to find in the docs.
Anyone can point me to it?
Thanks,
Florian
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am proud to announce the availability of eric3 3.7.1. This is a bug fix
release which fixes a severe bug next to some normal ones.
NOTE: Everybody using 3.7.0 or 3.6.x should upgrade.
It is available via http://www.die-offenbachs.de/detlev/eric3.html.
What is it?
---
Eric3 is a
Florian Lindner wrote:
Hello,
IIRC there is a directory traverser for walking recursively through
subdirectories in the standard library. But I can't remember the name and
was unable to find in the docs.
Where did you look? How did you look?
Anyone can point me to it?
Did you try Googling
Hi,
I am using CherryPy to make a very small Blog web app.
Of course I use a textarea input on a page to get some information.
Most of the time when text is entered into it, there will be carriage
returns.
When I take the text and then try to re-write it out to output (in html
on a web page), I
Hello,
I try to compute SHA hashes for different files:
for root, dirs, files in os.walk(sys.argv[1]):
for file in files:
path = os.path.join(root, file)
print path
f = open(path)
sha = sha.new(f.read())
sha.update(f.read())
print
Harlin Seritt wrote:
Hi,
I am using CherryPy to make a very small Blog web app.
Of course I use a textarea input on a page to get some information.
Most of the time when text is entered into it, there will be carriage
returns.
When I take the text and then try to re-write it out to
Florian Lindner wrote:
Hello,
I try to compute SHA hashes for different files:
for root, dirs, files in os.walk(sys.argv[1]):
for file in files:
path = os.path.join(root, file)
print path
f = open(path)
print sha is, repr(sha) ### self-help !
On Sat, 09 Jul 2005 13:49:12 +0200,
Florian Lindner [EMAIL PROTECTED] wrote:
Hello,
I try to compute SHA hashes for different files:
for root, dirs, files in os.walk(sys.argv[1]):
for file in files:
path = os.path.join(root, file)
print path
f = open(path)
Alex Gittens wrote:
I'm getting an UnboundLocalError
def fieldprint(widths,align,fields): [...]
def cutbits(): [...]
fields = fields[widths[i]:]
There's your problem. You are assigning 'fields' a completely new
value. Python doesn't allow you to rebind a variable from an outer
Florian Lindner wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
Hello,
I try to compute SHA hashes for different files:
for root, dirs, files in os.walk(sys.argv[1]):
for file in files:
path = os.path.join(root, file)
print path
f = open(path)
Here
Ralf W. Grosse-Kunstleve schrieb:
My initial proposal
(http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html) didn't
exactly get a warm welcome...
Well ... yes ;)
Ralf, if you want to modify the class instantiation behaviour you
should have a look on metaclasses. That's what they
Donn Cave wrote:
I ran into a phenomenon that seemed odd to me, while testing a
build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e.
test_builtin.py, for example, fails a couple of tests with errors
claiming that apparently identical floating point values aren't equal.
But it only does that
Hi!
When I compile my python files with python -OO into pyo files
then they still contain absolute paths of the source files which is
undesirable for me. How can I deal with that?
Thank you.
David
--
http://mail.python.org/mailman/listinfo/python-list
Bengt Richter wrote:
On Fri, 08 Jul 2005 22:29:30 -0600, Steven Bethard [EMAIL PROTECTED] wrote:
(1) There's no reason to get uncomfortable even if they're removed.
You'd just replace [] with list().
So list(1, 2, 3) will be the same as [1, 2, 3] ??
No, the discussion is about list
David Siroky wrote:
When I compile my python files with python -OO into pyo files
then they still contain absolute paths of the source files which is
undesirable for me. How can I deal with that?
Don't do that?
Delete the pyo files?
Stop using Python?
I could guess at a few more
In all probability, both list comprehensions and generator expressions
will be around in perpetuity. List comps have been a very successful
language feature.
The root of this discussion has been the observation that a list
comprehension can be expressed in terms of list() and a generator
Ok, dennis, your solution may be better, but is quite dangerous:
Python can't handle if there is exactly 3 arguments passed to the
function. The created code is correct but the error will appear when
your run Fortran.
Cyril
On 7/9/05, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Fri, 8 Jul
Dennis Lee Bieber wrote:
On 7/8/05, Einstein, Daniel R [EMAIL PROTECTED] wrote:
Hi,
Sorry for this, but I need to write ASCII from my Python to be read by
FORTRAN and the formatting is very important. Is there any way of doing
anything like:
write(*,'(3( ,1pe20.12))')
On Sat, 09 Jul 2005 10:16:17 -0400, Peter Hansen [EMAIL PROTECTED] wrote:
Bengt Richter wrote:
On Fri, 08 Jul 2005 22:29:30 -0600, Steven Bethard [EMAIL PROTECTED] wrote:
(1) There's no reason to get uncomfortable even if they're removed.
You'd just replace [] with list().
So list(1, 2, 3)
On 9 Jul 2005 05:26:46 -0700, [EMAIL PROTECTED] wrote:
Alex Gittens wrote:
I'm getting an UnboundLocalError
def fieldprint(widths,align,fields): [...]
def cutbits(): [...]
fields = fields[widths[i]:]
There's your problem. You are assigning 'fields' a completely new
value.
[Donn Cave]
I ran into a phenomenon that seemed odd to me, while testing a
build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e.
test_builtin.py, for example, fails a couple of tests with errors
claiming that apparently identical floating point values aren't equal.
But it only does that when
Raymond Hettinger [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
In all probability, both list comprehensions and generator expressions
will be around in perpetuity. List comps have been a very successful
language feature.
The root of this discussion has been the observation that
Quoth Dave Cook [EMAIL PROTECTED]:
| On 2005-07-08, Charlie Calvert [EMAIL PROTECTED] wrote:
|
| I perhaps rather foolishly wrote two article that mentioned Python as a
| good alternative language to more popular tools such as C# or Java. I
|
| Sounds like a really hidebound bunch over there.
Raymond Hettinger wrote:
So, I would recommend Python to these
folks as an easily acquired extra skill.
I agree 100% with your statement above. Python may not be sufficient
for being the only programming language that one needs to know -- yet,
it does come in VERY handy for projects that
On 2005-07-09, Brian [EMAIL PROTECTED] wrote:
folks as an easily acquired extra skill.
I agree 100% with your statement above. Python may not be sufficient
for being the only programming language that one needs to know -- yet,
it does come in VERY handy for projects that need to perform
Hi all, Any one got idea about how to set undisclosed recipient? I put
all recipient in BCC field while the To field don't want to leave
blank. but neither fail to place an empty email address nor i don't
want to put my own email address inside. www.bartekrr.info
--
Raymond Hettinger [EMAIL PROTECTED] wrote:
In all probability, both list comprehensions and generator expressions
will be around in perpetuity. List comps have been a very successful
language feature.
The root of this discussion has been the observation that a list
comprehension can be
On Sat, 09 Jul 2005 06:17:20 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote:
On Fri, 8 Jul 2005 21:21:36 -0500, Alex Gittens [EMAIL PROTECTED] wrote:
I'm trying to define a function that prints fields of given widths
with specified alignments; to do so, I wrote some helper functions
nested inside
Jeff Hobbs wrote:
chand wrote:
can anyone help me how to provide the info about the python file
procedure in the tcl script which uses tclpython i.e., is there a way
to import that .py file procedure in the tcl script
currently I have wriiten this tcl code which is not working
package
George Sakkis [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
It's funny how one of the
arguments for removing lambda -- you can do the same by defining a
named function -- does not apply for list comprehensions.
Which is a point a number of people have made many times,
with about
[EMAIL PROTECTED] wrote:
Hi all, Any one got idea about how to set undisclosed recipient? I put
all recipient in BCC field while the To field don't want to leave
blank. but neither fail to place an empty email address nor i don't
want to put my own email address inside. www.bartekrr.info
I know that this topic has the potential for blowing up in my face,
but I can't help asking. I've been using Python since 1.5.1, so I'm
not what you'd call a n00b. I dutifully evangelize on the goodness
of Python whenever I talk with fellow developers, but I always hit a
snag when it comes to
Kay Schluehr [EMAIL PROTECTED] writes:
Kirk Job Sluder schrieb:
In what way do lisp macros prevent the creation of modular libraries?
Common Lisp does does have mechanisms for library namespaces, and in
practice a macro contained within a library is not that much different
from a
On Fri, 08 Jul 2005 22:43:55 +0300, Elmo Mäntynen [EMAIL PROTECTED]
wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Import Error: no module named PP2E.launchmodes
However if I copy launchmodes.py into my work directory, it imports
successfully.
Both Examples above and
George Sakkis wrote:
Jacob Page [EMAIL PROTECTED] wrote:
George Sakkis wrote:
1. As already noted, ISet is not really descriptive of what the class
does. How about RangeSet ? It's not that long and I find it pretty
descriptive. In this case, it would be a good idea to change Interval
to Range
You provided far too little information for us to be able to help.
If you are using smtplib, it doesn't even look at message's headers to
find the recipient list; you must use the rcpt() method to specify each
one. If you are using the sendmail method, the to_addrs list has no
relationship to
Honestly, I'm rather new to python, but my best bet would be to create
some test code and time it.
--
http://mail.python.org/mailman/listinfo/python-list
Jacob Page [EMAIL PROTECTED] wrote:
George Sakkis wrote:
There are several possible use cases where dealing directly with
intervals would be appropriate or necessary, so it's good to have them
supported directly by the module.
I think I will keep Interval exposed. It sort of raises a
Python is compiling the files with absolute paths because it is much
faster to load a file when you know where it is, than to have to find
it and then load it.
I'm guessing you're wondering this so you can distribute it compiled or
such? If so, I wouldn't do that in the first place. Python's
I'm working on my monthly column for Software Test Performance
magazine, and I'd like your input. The topic, this time around, is unit
testing (using python or anything else). Care to share some of your
hard-won knowledge with your peers?
In particular, what I'm looking for are experiences and
My shot would be to test it like this on your platform like this:
#!/usr/bin/env python
import datetime, time
t1 = datetime.datetime.now()
for i in [str(x) for x in range(100)]:
if int(i) == i:
i + 1
t2 = datetime.datetime.now()
print t2 - t1
for i in [str(x) for x in
Steve Juranich [EMAIL PROTECTED] wrote:
Without fail, when I start talking with some of the old-timers
(people who have written code in ADA or Fortran), I hear the same
arguments that using if is better than using try.
Well, you've now got a failure. I used to write Fortran on punch cards, so
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
My shot would be to test it like this on your platform like this:
#!/usr/bin/env python
import datetime, time
t1 = datetime.datetime.now()
for i in [str(x) for x in range(100)]:
if int(i) == i:
i + 1
t2 =
Hi all,
How do I make Python get a def? Is it the get function, or something
else? I need to know so that I can get a def for that computer
MasterMind(tm) game that I'm writing.
BTW, I took your advice, and wrote some definitions for my Giant
Calculator program. Might make the code
Tim Peters [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[Donn Cave]
I ran into a phenomenon that seemed odd to me, while testing a
build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e.
test_builtin.py, for example, fails a couple of tests with errors
claiming that apparently
[EMAIL PROTECTED] a écrit :
My shot would be to test it like this on your platform like this:
#!/usr/bin/env python
import datetime, time
Why not use the timeit module instead ?
t1 = datetime.datetime.now()
for i in [str(x) for x in range(100)]:
A bigger range (at least 10/100x more)
Grant Edwards a écrit :
On 2005-07-09, Brian [EMAIL PROTECTED] wrote:
folks as an easily acquired extra skill.
I agree 100% with your statement above. Python may not be sufficient
for being the only programming language that one needs to know -- yet,
it does come in VERY handy for
Steve Juranich [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Without fail, when I start talking with some of the old-timers
(people who have written code in ADA or Fortran), I hear the same
arguments that using if is better than using try. I think that
the argument goes
* Steve Juranich (2005-07-09 19:21 +0100)
I know that this topic has the potential for blowing up in my face,
but I can't help asking. I've been using Python since 1.5.1, so I'm
not what you'd call a n00b. I dutifully evangelize on the goodness
of Python whenever I talk with fellow
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
My shot would be to test it like this on your platform like this:
#!/usr/bin/env python
import datetime, time
t1 = datetime.datetime.now()
for i in [str(x) for x in range(100)]:
if int(i) == i:
i + 1
t2 =
This post started as an incredibly long winded essay, but halfway
through I decided that was a terribly bad idea, so I've trimmed it
down dramatically, and put it in the third person (for humor's sake).
Once upon a time a boy named Hypothetical programmed in PHP and made
many a web application.
Thorsten Kampe [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
* Steve Juranich (2005-07-09 19:21 +0100)
I know that this topic has the potential for blowing up in my face,
but I can't help asking. I've been using Python since 1.5.1, so I'm
not what you'd call a n00b. I dutifully
dear all
could you tell me how can i fix this error appears when i try to import modules from nltk
as follows
from nltk.probability import ConditionalFreqDist
Traceback (most recent call last): File "pyshell#1", line 1, in -toplevel- from nltk.probability import ConditionalFreqDist File
;-)
We have
@deco
def foo(): pass
as sugar (unless there's an uncaught exception in the decorator) for
def foo(): pass
foo = deco(foo)
The binding of a class name is similar, and class decorators would seem
natural, i.e.,
@cdeco
class Foo: pass
for
class Foo: pass
Steve Juranich wrote:
I was wondering how true this holds for Python, where exceptions are such
an integral part of the execution model. It seems to me, that if I'm
executing a loop over a bunch of items, and I expect some condition to
hold for a majority of the cases, then a try block would
Take some time to learn one of the web frameworks. If your host doesn't
already have it, ask your host if they would consider adding it.
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Lotze wrote:
Steve Juranich wrote:
What do I mean by cheaper? I'm basically talking about the number of
instructions that are necessary to set up and execute a try block as
opposed to an if block.
I don't know about the implementation of exceptions but I suspect most
of what try does
enas khalil wrote:
dear all
could you tell me how can i fix this error appears when i try to import
modules from nltk
as follows
from nltk.probability import ConditionalFreqDist
Traceback (most recent call last):
File pyshell#1, line 1, in -toplevel-
from nltk.probability import
I would like my program to accept a list of range values on the
command line, like
-a 1
-a 1-10
-a 4,5,2
In the interest of avoiding reinventing the wheel, is there already
available code for a callback that would enable optparse to parse
these as arguments?
Thanks,
Alex
--
ChapterZero:
Daniel Bickett wrote:
He would read the documentation of Nevow, Zope, and Quixote, and would
find none of them to his liking because:
* They had a learning curve, and he was not at all interested, being
eager to fulfill his new idea for the web app. It was his opinion that
web programming
Ron Adam wrote:
George Sakkis wrote:
I get:
None: 0.54952316
String: 0.498000144958
is None: 0.45047684
What do yo get for name is 'string' expressions?
'abc' is 'abcd'[:3]
False
You need to test for equality (==), not identity (is) when
equal things may be
Daniel Bickett wrote:
He would read the documentation of Nevow, Zope, and Quixote, and would
find none of them to his liking because:
* They had a learning curve, and he was not at all interested, being
eager to fulfill his new idea for the web app. It was his opinion that
web programming
Try Karrigell ( http://karrigell.sourceforge.net ).
And let me know what you think...
Cheers,
Luis
--
http://mail.python.org/mailman/listinfo/python-list
--- Kay Schluehr [EMAIL PROTECTED] wrote:
Ralf, if you want to modify the class instantiation behaviour you
I don't. I simply want to give the user a choice:
__init__(self, ...) # same as always (no modification)
or
__autoinit__(self, ...) # self.x=x job done automatically and
Sorry, I forgot the attachment.
Sell on Yahoo! Auctions no fees. Bid on great items.
http://auctions.yahoo.com/import sys, os
class plain_grouping:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z =
Ralf W. Grosse-Kunstleve wrote:
My initial proposal
(http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html) didn't
exactly get a warm welcome...
And Now for Something Completely Different:
class autoinit(object):
def __init__(self, *args, **keyword_args):
--- Scott David Daniels [EMAIL PROTECTED] wrote:
Should be:
class autoinit(object):
def __init__(self, *args, **keyword_args):
for name, value in zip(self.__autoinit__.im_func.func_code.
co_varnames[1:], args):
Bruno Desthuilliers [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
Grant Edwards a écrit :
On 2005-07-09, Brian [EMAIL PROTECTED] wrote:
folks as an easily acquired extra skill.
I agree 100% with your statement above. Python may not be sufficient
for being the only programming
Roy Smith wrote:
Well, you've now got a failure. I used to write Fortran on punch cards,
which were then fed into an OCR gadget? That's an efficient approach --
where I was, we had to write the FORTRAN [*] on coding sheets; KPOs
would then produce the punched cards.
[snip]
3) In some
George Sakkis wrote:
Jacob Page [EMAIL PROTECTED] wrote:
I think I will keep Interval exposed. It sort of raises a bunch of
hard-to-answer design questions having two class interfaces, though.
For example, would Interval.between(2, 3) + Interval.between(5, 7) raise
an error (as it currently
After some feedback from this newsgroup, I've updated and renamed the
iset module to the interval module. Many of the names within the module
have also changed, and I've refactored a lot of the code. The updated
version can be found at http://members.cox.net/apoco/interval/, as well
as a
Devan L wrote:
import timeit
t1 = timeit.Timer('list(i for i in xrange(10))')
t1.timeit()
27.267753024476576
t2 = timeit.Timer('[i for i in xrange(10)]')
t2.timeit()
15.050426800054197
t3 = timeit.Timer('list(i for i in xrange(100))')
t3.timeit()
117.61078097914682
t4 =
Raymond Hettinger wrote:
The root of this discussion has been the observation that a list
comprehension can be expressed in terms of list() and a generator
expression.
As George Sakkis already noted, the root of the discussion was actually
the rejection of the dict comprehensions PEP.
Daniel Bickett wrote:
Python using CGI, for example, was enough for him until he started
getting 500 errors that he wasn't sure how to fix.
Every time you mention web applications on this list, there will
necessarily be a flood of My Favourite Framework Is X posts.
But you* sound like you
Alex Gittens wrote:
I would like my program to accept a list of range values on the
command line, like
-a 1
-a 1-10
-a 4,5,2
In the interest of avoiding reinventing the wheel, is there already
available code for a callback that would enable optparse to parse
these as arguments?
Doesn't
On Sat, 09 Jul 2005 23:10:49 +0200, Thomas Lotze wrote:
Steve Juranich wrote:
I was wondering how true this holds for Python, where exceptions are such
an integral part of the execution model. It seems to me, that if I'm
executing a loop over a bunch of items, and I expect some condition
[Steven Bethard]
I would hope that in Python 3.0 list comprehensions and generator
expressions would be able to share a large amount of implementation, and
thus that the speed differences would be much smaller. But maybe not...
Looking under the hood, you would see that the implementations
[Raymond Hettinger]
It is darned inconvenient to get an iterator when you really
need a list, when you want to slice the result, when you want to see a
few elements through repr(), and when you need to loop over the
contents more than once.
[George Sakkis]
Similar arguments can be given
I'm a total Python newbie, so bear with me here...
I'm writing a program that has a user-configurable, module-based
architecture. it's got a directory where modules are stored (.py files)
which subclass one of several master classes.
My plan is to have the program go into the folder called
Throne Software has opened up a Python Forum at:
http://www.thronesoftware.com/forum/
Join us!
--
http://mail.python.org/mailman/listinfo/python-list
I see a total of 12 posts and 8 users.
--
http://mail.python.org/mailman/listinfo/python-list
Steve Juranich [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
I was wondering how true this holds for Python, where exceptions are
such an integral part of the execution model. It seems to me, that if
I'm executing a loop over a bunch of items, and I expect some
condition to hold for a
Raymond Hettinger wrote:
[Steven Bethard]
I would hope that in Python 3.0 list comprehensions and generator
expressions would be able to share a large amount of implementation, and
thus that the speed differences would be much smaller. But maybe not...
Looking under the hood, you would see
I neglected to mention an important fact, and that is the fact that I
am limited to Apache, which elminates several suggestions (that are
appreciated none-the-less).
--
Daniel Bickett
dbickett at gmail.com
http://heureusement.org/
--
http://mail.python.org/mailman/listinfo/python-list
I have python2.4.1 installed on two machines:
-- one is Fedora core 1, where the bsddb module works fine
-- one is Redhat ES 3.0, and I installed mysql 4.1 (and
mysql-python2.1) after putting the newer python on the machine.
python2.2, which came with Redhat ES, works fine, so I suppose I
messed
I stripped your code down to the essence. See attachment.
For the user your approach then becomes:
class grouping:
__metaclass__ = autoattr
def __init__(self, x, y, z):
pass
No. This is clearly NOT what I had in mind. I translated your original
proposal which introduced a
1 - 100 of 104 matches
Mail list logo