Hi all,
i just released some bits related to automated testing with Python:
py-1.2.0: py.test core which grew junitxml, standalone-script generation
pytest-xdist-1.0: separately installable dist-testing looponfailing plugin
pytest-figleaf-1.0: separately installable figleaf-coverage
Email not displaying correctly? View it in your browser.
Happy 2010! To start the year off, we've released a new version of EPD
and lined up a solid set of training options.
Scientific Computing with Python Webinar
This Friday, Travis Oliphant will then provide an introduction to
Email not displaying correctly? View it in your browser.
Happy 2010! To start the year off, we've released a new version of EPD
and lined up a solid set of training options.
Scientific Computing with Python Webinar
This Friday, Travis Oliphant will then provide an introduction to
Dear Python users,
I am pleased to announce version 10.0 of the data plotting software
DISLIN.
DISLIN is a high-level and easy to use plotting library for
displaying data as curves, bar graphs, pie charts, 3D-colour plots,
surfaces, contours and maps. Several output formats are supported
such
Anand Vaidya wrote:
Is there a generic python benchmark suite in active development? I am
looking forward to comparing some code on various python
implementations (primarily CPython 2.x, CPython 3.x, UnladenSwallow,
Psyco).
I am happy with something that gives me a relative number eg: ULS
bartc ba...@freeuk.com wrote in message
news:xl_4n.28001$ym4.5...@text.news.virginmedia.com...
Any particular reason why two, and not one (or three)? In some fonts it's
difficult to
tell how many as they run together.
It follows the C convention for reserved identifers.
--
Looks like homework.
--
http://mail.python.org/mailman/listinfo/python-list
dads, 18.01.2010 22:39:
There was one thing that I forgot about - when ElementTree fails to
parse due to an element not being closed why doesn't it close the file
like object.
Because it didn't open it?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm using threading module in Python 2.6.4. I'm using thread's join()
method.
On the new thread I'm running a function which returns a code at the
end. Is there a way I access that code in the parent thread after
thread finishes? Simply, does join() could get me that code?
Regards,
Rajat
Il 18/01/2010 21:59, Mike Driscoll ha scritto:
On Jan 18, 8:32 am, ted t...@sjksdjk.it wrote:
Hi at all...
Can someone please give me some advice, about a good IDE with control
GUI under Linux ?
Actually i know QT Creator by Nokia which i can use with Python (but i
don't know how).
And, a
* Rajat:
Hi,
I'm using threading module in Python 2.6.4. I'm using thread's join()
method.
On the new thread I'm running a function which returns a code at the
end. Is there a way I access that code in the parent thread after
thread finishes? Simply, does join() could get me that code?
Hi All,
I'm wondering what test runner I should use. Here's my list of requirements:
- cross platform (I develop for and on Windows, Linux and Mac)
- should not prevent tests from running with other test runners
(so no plugins/layers/etc that only work with one specific test
runner)
-
* Dr. Benjamin David Clarke:
I currently have a program that reads in values for an OptionMenu from
a text file. I also have an option to add a line to that text file
which corresponds to a new value for that OptionMenu. How can I make
that OptionMenu update its values based on that text file
Dear Pytnon users,
I am pleased to announce version 10.0 of the data plotting software
DISLIN.
DISLIN is a high-level and easy to use plotting library for
displaying data as curves, bar graphs, pie charts, 3D-colour plots,
surfaces, contours and maps. Several output formats are supported
such
I am using PyUnit (unittest module) for loading test cases from our
modules and executing them. Is it possible to export the test results
as HTML report? Currently the results appear as text on standard
output while the tests execute. But is there something out of the box
available in PyUnit to
On Jan 16, 6:55 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
I have a series of subclasses that inherit methods from a base class, but
I'd like them to have their own individual docstrings.
The following is not tested more than you see and will not work for
builtin methods,
Le Mon, 18 Jan 2010 21:05:26 -0800, Anand Vaidya a écrit :
@Antoine, Terry,
Thanks for the suggestions.
I will investigate those. I just ran the pybench, doesn't run on 3.x,
2to3 fails.
You just have to use the pybench version that is bundled with 3.x (in the
Tools directory).
--
Dr. Benjamin David Clarke wrote:
I currently have a program that reads in values for an OptionMenu from
a text file. I also have an option to add a line to that text file
which corresponds to a new value for that OptionMenu. How can I make
that OptionMenu update its values based on that text
Helmut Michels ha scritto:
Dear Pytnon users,
I am pleased to announce version 10.0 of the data plotting software
DISLIN.
why dont you make it free software (i mean. GPL'ed)
bye
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 18, 11:04 pm, tom badoug...@gmail.com wrote:
hi...
trying to figure out how to solve what should be an easy python/regex/
wildcard/replace issue.
i've tried a number of different approaches.. so i must be missing
something...
my initial sample text are:
Soo
Gabriel Genellina wrote:
I see.
Then is there a reason why
return super(Subclass, self).parrot()
would be prefered over the classic
return Base.parrot(self)
?
Or is it just a matter of preference ?
For a longer explanation, see:
James Knight: Python's Super Considered Harmful
On Jan 18, 4:21 pm, John Bokma j...@castleamber.com wrote:
Gnarlodious gnarlodi...@gmail.com writes:
I am running a script in a browser that finds the file in subfolder
Data:
Content=Plist('Data/Content.plist')
However, running the same script in Terminal errors:
IOError: [Errno 2]
Yesterday I stumbled across some old code in a project I was working
on. It does something like this:
mystring = '\n'.join( [ line for line in lines if some conditions
depending on line ] )
where lines is a simple list of strings. I realized that the code
had been written before you could put
Il 18/01/2010 21:59, Mike Driscoll ha scritto:
On Jan 18, 8:32 am, tedt...@sjksdjk.it wrote:
Hi at all...
Can someone please give me some advice, about a good IDE with control
GUI under Linux ?
Actually i know QT Creator by Nokia which i can use with Python (but i
I am using Python 3, getting an error from SQLite:
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless
you use a text_factory that can interpret 8-bit bytestrings (like
text_factory = str). It is highly recommended that you instead just
switch your application to Unicode strings.
* Gerald Britton:
Yesterday I stumbled across some old code in a project I was working
on. It does something like this:
mystring = '\n'.join( [ line for line in lines if some conditions
depending on line ] )
where lines is a simple list of strings. I realized that the code
had been written
Thanks! Good explanation.
On Tue, Jan 19, 2010 at 10:57 AM, Alf P. Steinbach al...@start.no wrote:
* Gerald Britton:
Yesterday I stumbled across some old code in a project I was working
on. It does something like this:
mystring = '\n'.join( [ line for line in lines if some conditions
On Tue, Jan 19, 2010 at 7:30 AM, Gerald Britton gerald.brit...@gmail.comwrote:
[snip]
mystring = '\n'.join( line for line in lines if some conditions
depending on line )
Note, this is not a list comprehension, but a generator comprehension.
A list comprehension is used to build, in one
Hi,
I decided to play around with the multiprocessing module, and I'm
having some strange side effects that I can't explain. It makes me
wonder if I'm just overlooking something obvious or not. Basically, I
have a script parses through a lot of files doing search and replace
on key strings
On Jan 19, 8:03 am, Gnarlodious gnarlodi...@gmail.com wrote:
On Jan 18, 4:21 pm, John Bokma j...@castleamber.com wrote:
Gnarlodious gnarlodi...@gmail.com writes:
I am running a script in a browser that finds the file in subfolder
Data:
Content=Plist('Data/Content.plist')
However,
I'm uses the curses module of Python to create a TUI. I can create
windows, and subwindows, but I can't find anything on deleting or
disposing of a a subwindow.
http://docs.python.org/library/curses.html
http://www.amk.ca/python/howto/curses/curses.html
How do I get rid of a subwindow?
--
On Tue, 19 Jan 2010, Robert P. J. Day wrote:
i'm currently checking out python3 from the svn repo, configuring,
building and installing under /usr/local/bin on my fedora 12 system,
all good.
i'm curious, though -- is there a query i can make of that
executable that would tell me what
hi
I was going thru the weblog appln in practical django book by
bennet .I came across this
class Entry(Model):
def save(self):
dosomething()
super(Entry,self).save()
I couldn't make out why Entry and self are passed as arguments to super
().Can someone
Interestingly, I scaled it up to a million list items with more or
less the same results. It's helpful to see that your results are
different. That leads me to suspect that mine are somehow related to
my own environment.
Still I think the key is the overhead in calling next() for each item
in
I decided to play around with the multiprocessing module, and I'm
having some strange side effects that I can't explain. It makes me
wonder if I'm just overlooking something obvious or not. Basically, I
have a script parses through a lot of files doing search and replace
on key strings
i'm currently checking out python3 from the svn repo, configuring,
building and installing under /usr/local/bin on my fedora 12 system,
all good.
i'm curious, though -- is there a query i can make of that
executable that would tell me what svn rev it was built from? i'm
guessing not, but i
On Jan 19, 10:26 am, Adam Tauno Williams awill...@opengroupware.us
wrote:
I decided to play around with the multiprocessing module, and I'm
having some strange side effects that I can't explain. It makes me
wonder if I'm just overlooking something obvious or not. Basically, I
have a
I was wondering if there was a way to create a list (which in this
case would contain several dicts) based on a string passed in by the
user. Security is not an issue. Basically I want to be able to have
the user pass in using optparse:
--actions=[{action_name: action_1, val: asdf, val2:
asdf},
On Jan 18, 11:37 am, Grant Edwards inva...@invalid.invalid wrote:
On 2010-01-18, Jive Dadson notonthe...@noisp.com wrote:
I just found another module that broke when I went to 2.6. Gnuplot.
Apparently one of its routines has a parameter named with. That used
to be okay, and now it's not.
Hi;
i am having trouble trying to sort the rows of a 2 dimensional array by the
values in the first column .. does anybody know how or have an example of
how to do this ??? while leaving the remain columns remain relative to the
leading column
from numpy import *
a=array( [ [4, 4, 3], [4, 5,
Hi;
i am having trouble trying to sort the rows of a 2 dimensional array by the
values in the first column .. does anybody know how or have an example of
how to do this ??? while leaving the remain columns remain relative to the
leading column
from numpy import *
a=array( [ [4, 4, 3], [4, 5,
2010/1/19 harryos oswald.ha...@gmail.com:
I was going thru the weblog appln in practical django book by
bennet .I came across this
class Entry(Model):
def save(self):
dosomething()
super(Entry,self).save()
I couldn't make out why Entry and self are
SoxFan44 wrote:
I was wondering if there was a way to create a list (which in this
case would contain several dicts) based on a string passed in by the
user. Security is not an issue. Basically I want to be able to have
the user pass in using optparse:
--actions=[{action_name: action_1,
On Jan 19, 3:16 am, fossist foss...@gmail.com wrote:
I am using PyUnit (unittest module) for loading test cases from our
modules and executing them. Is it possible to export the test results
as HTML report? Currently the results appear as text on standard
output while the tests execute. But
Hi;
i am having trouble trying to sort the rows of a 2 dimensional array by
the values in the first column .. does anybody know how or have an
example of how to do this ??? while leaving the remain columns remain
relative to the leading column
from numpy import *
a=array( [ [4, 4, 3], [4,
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it possible to call the group names, so that I can iterate over
them?
The result I'm looking
On Jan 18, 11:09 pm, Jean Guillaume Pyraksos wis...@hotmail.com
wrote:
What's the best one to use with beginners ?
Something with integrated syntax editor, browser of doc...
Thanks,
Before this message goes stale, there's TextMate (which I have too
much experience with to consider redeemable
Can't you just use the dict() built-in function like this:
dict({action_name: action_1, val: asdf})
Of course if the list is not properly formed, this will fail. But I
guess you have thought of that already.
On Tue, Jan 19, 2010 at 11:33 AM, SoxFan44 gregchag...@gmail.com wrote:
I was
2010/1/19 Peter Otten __pete...@web.de:
Both eval() and json.loads() will do. eval() is dangerous as it allows the
user to run arbitrary python code.
Something like http://code.activestate.com/recipes/364469/ might be
worth a look too.
--
Cheers,
Simon B.
--
Brian D wrote:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it possible to call the group names, so that I can iterate over
them?
* Brian D:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it possible to call the group names, so that I can iterate over
them?
The result
thanks Simon..I should have checked it
--
http://mail.python.org/mailman/listinfo/python-list
Brian D wrote:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it possible to call the group names, so that I can iterate over
them?
=== Python-es mailing list changes home ===
Due to technical problems with the site that usually ran the Python-es
mailing list (Python list for the Spanish speaking community), we are
setting up a new one under the python.org umbrella. Hence, the new
list will become python...@python.org (the
On 2010-01-19 11:00 AM, Robert Somerville wrote:
Hi;
i am having trouble trying to sort the rows of a 2 dimensional array by
the values in the first column .. does anybody know how or have an
example of how to do this ??? while leaving the remain columns remain
relative to the leading column
On Tue, Jan 19, 2010 at 9:00 AM, Robert Somerville
rsomervi...@sjgeophysics.com wrote:
Hi;
Hi, why did you post this three times?
i am having trouble trying to sort the rows of a 2 dimensional array by the
values in the first column .. does anybody know how or have an example of
how to
On Jan 19, 11:28 am, Peter Otten __pete...@web.de wrote:
Brian D wrote:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it
On Jan 19, 11:51 am, Brian D brianden...@gmail.com wrote:
On Jan 19, 11:28 am, Peter Otten __pete...@web.de wrote:
Brian D wrote:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match
Brian D wrote:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it possible to call the group names, so that I can iterate over
them?
The
Peter Otten wrote:
def replace_many(s, pairs):
if len(pairs):
a, b = pairs[0]
rest = pairs[1:]
return b.join(replace_many(t, rest) for t in s.split(a))
else:
return s
-
Proves wrong, this way x - y - z.
You call replace_many again on the
Wyrmskull wrote:
Peter Otten wrote:
def replace_many(s, pairs):
if len(pairs):
a, b = pairs[0]
rest = pairs[1:]
return b.join(replace_many(t, rest) for t in s.split(a))
else:
return s
Proves wrong, this way x - y - z.
You call replace_many again
Cleaned. You can remove the 'else's if you want,
because 'return' breaks the instruction flow.
Should also work with other sequence types.
def mySubst(reps,seq):
if reps:
a,b,c = string.partition(reps[0][0])
if b:
return mySubst(reps,a) +
Nvm, my bad, I misunderstood the split instruction.
No difference :)
---
Wyrmskull
P.S Sorry about the P.M., I misclicked on a GUI
--
http://mail.python.org/mailman/listinfo/python-list
Jean Guillaume Pyraksos wis...@hotmail.com wrote:
What's the best one to use with beginners ?
Something with integrated syntax editor, browser of doc...
Thanks,
I started with 'EasyEclipse for Python', but soon changed to Eclipse
with PyDev, MercurialEclipse and AnyEditTools plugins installed
On Tue, Jan 19, 2010 at 2:09 AM, Jean Guillaume Pyraksos wis...@hotmail.com
wrote:
What's the best one to use with beginners ?
Something with integrated syntax editor, browser of doc...
Thanks,
JG
--
http://mail.python.org/mailman/listinfo/python-list
I whole-heartedly recommend
OK I guess that is normal, I fixed it with this:
path=os.path.dirname(__file__)+/Data/
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
On 19 Jan., 16:30, Gerald Britton gerald.brit...@gmail.com wrote:
Timer(' '.join([x for x in l]), 'l = map(str,range(10))').timeit()
2.9967339038848877
Timer(' '.join(x for x in l), 'l = map(str,range(10))').timeit()
7.2045478820800781
[...]
2. Why should the pure list comprehension be
On Tue, Jan 19, 2010 at 7:50 AM, Gnarlodious gnarlodi...@gmail.com wrote:
I am using Python 3, getting an error from SQLite:
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless
you use a text_factory that can interpret 8-bit bytestrings (like
text_factory = str). It is highly
[snip]
Yes, list building from a generator expression *is* expensive. And
join has to do it, because it has to iterate twice over the iterable
passed in: once for calculating the memory needed for the joined
string, and once more to actually do the join (this is implementation
dependent, of
samwyse wrote:
On Jan 18, 1:56 am, Terry Reedy tjre...@udel.edu wrote:
On 1/17/2010 5:37 PM, samwyse wrote:
Consider this a wish list. I know I'm unlikely to get any of these in
time for for my birthday, but still I felt the need to toss it out and
see what happens.
Lately, I've
Gerald Britton gerald.brit...@gmail.com writes:
[snip]
Yes, list building from a generator expression *is* expensive. And
join has to do it, because it has to iterate twice over the iterable
passed in: once for calculating the memory needed for the joined
string, and once more to actually
On 19 Jan., 21:06, Gerald Britton gerald.brit...@gmail.com wrote:
[snip]
Yes, list building from a generator expression *is* expensive. And
join has to do it, because it has to iterate twice over the iterable
passed in: once for calculating the memory needed for the joined
string, and
In article hickp8$cfg$0...@news.t-online.com,
Peter Otten __pete...@web.de wrote:
The use cases for an order that works across types like int and str are
weak to non-existent. Implementing it was considered a mistake and has
been fixed in Python 3:
That is not precisely correct from my POV.
That's surprising. I wouldn't implement it that way at all. I'd use a
dynamically-expanding buffer as I suggested. That way you get a
single pass and don't have to calculate anything before you begin. In
the best case, you'd use half the memory (the result just fits in the
buffer after its last
On Jan 8, 2:54 pm, Ben Finney ben+pyt...@benfinney.id.au wrote:
Chris Rebert c...@rebertia.com writes:
JSON is one option:http://docs.python.org/library/json.html
YAML URL:http://en.wikipedia.org/wiki/YAML is another contender.
Compared to JSON, it is yet to gain as much mind-share, but even
On Jan 19, 7:00 am, Peter Otten __pete...@web.de wrote:
Dr. Benjamin David Clarke wrote:
I currently have a program that reads in values for an OptionMenu from
a text file. I also have an option to add a line to that text file
which corresponds to a new value for that OptionMenu. How can I
[Wolfram Hinderer]
Yes, list building from a generator expression *is* expensive. And
join has to do it, because it has to iterate twice over the iterable
passed in: once for calculating the memory needed for the joined
string, and once more to actually do the join (this is implementation
Gerald Britton gerald.brit...@gmail.com writes:
That's surprising. I wouldn't implement it that way at all. I'd use a
dynamically-expanding buffer as I suggested. That way you get a
single pass and don't have to calculate anything before you begin. In
the best case, you'd use half the
never mind. just discovered that while python3 -V won't do it,
executing it gives me:
$ python3
Python 3.2a0 (py3k:77609, Jan 19 2010, 04:10:16)
...
and it's that 77609 rev number i was after.
If you want that in a command line fashion, do
python -c 'import
On Jan 19, 9:25 pm, Alf P. Steinbach al...@start.no wrote:
* Rajat:
Hi,
I'm using threading module in Python 2.6.4. I'm using thread's join()
method.
On the new thread I'm running a function which returns a code at the
end. Is there a way I access that code in the parent thread after
Hi All,
Pydev 1.5.4 has been released
Details on Pydev: http://pydev.org
Details on its development: http://pydev.blogspot.com
Release Highlights:
---
* Actions:
o Go to matching bracket (Ctrl + Shift + P)
o Copy the qualified name of the current context
On Tue, 19 Jan 2010 11:26:43 -0500, Gerald Britton wrote:
Interestingly, I scaled it up to a million list items with more or less
the same results.
A million items is not a lot of data. Depending on the size of each
object, that might be as little as 4 MB of data:
L = ['' for _ in
On Tue, 19 Jan 2010 16:20:42 -0500, Gerald Britton wrote:
That's surprising. I wouldn't implement it that way at all. I'd use a
dynamically-expanding buffer as I suggested. That way you get a single
pass and don't have to calculate anything before you begin. In the best
case, you'd use
Stephen Hansen apt.shan...@gmail.com wrote in message
news:7a9c25c21001191156j46a7fdadt58b728477b85e...@mail.gmail.com...
On Tue, Jan 19, 2010 at 7:50 AM, Gnarlodious gnarlodi...@gmail.com
wrote:
I am using Python 3, getting an error from SQLite:
sqlite3.ProgrammingError: You must not use
Well, Python 3 is supposed to be all Unicode by default. I shouldn't
even need to say
# coding:UTF-8
And, the file is saved as Unicode.
There are many mentions of this error found by Google, but none seen
to clearly say what the problem is or how to fix it.
FYI, the problem line says:
* Steven D'Aprano:
On Tue, 19 Jan 2010 16:20:42 -0500, Gerald Britton wrote:
That's surprising. I wouldn't implement it that way at all. I'd use a
dynamically-expanding buffer as I suggested. That way you get a single
pass and don't have to calculate anything before you begin. In the best
On Tue, Jan 19, 2010 at 8:16 PM, Gnarlodious gnarlodi...@gmail.com wrote:
Well, Python 3 is supposed to be all Unicode by default. I shouldn't
even need to say
# coding:UTF-8
And, the file is saved as Unicode.
There are many mentions of this error found by Google, but none seen
to clearly
Jean Guillaume Pyraksos wis...@hotmail.com wrote in message
news:wissme-9248e1.08090319012...@news.free.fr...
What's the best one to use with beginners ?
Something with integrated syntax editor, browser of doc...
Thanks,
JG
eclipse + pydev works well for me.
--Tim Arnold
--
On Wed, 20 Jan 2010 05:25:22 +0100, Alf P. Steinbach wrote:
* Steven D'Aprano:
On Tue, 19 Jan 2010 16:20:42 -0500, Gerald Britton wrote:
That's surprising. I wouldn't implement it that way at all. I'd use a
dynamically-expanding buffer as I suggested. That way you get a
single pass and
Hallo,
you can also look at list comprehension as syntactic sugar for the
functions map and filter. The two functions from the functional world
can be expressed in a comprehensive way with list comprehension.
[x**2 for x in range(10) ] == map ( lambda x: x*x, range(10))
True
[ x for x in
Steven D'Aprano ste...@remove.this.cybersource.com.au writes on 18 Jan 2010
06:47:59 GMT:
On Mon, 18 Jan 2010 07:25:58 +0100, Dieter Maurer wrote:
Lie Ryan lie.1...@gmail.com writes on Sat, 16 Jan 2010 19:37:29 +1100:
On 01/16/10 10:10, Sean DiZazzo wrote:
Interesting. I can understand
Gnarlodious gnarlodi...@gmail.com writes:
Well, Python 3 is supposed to be all Unicode by default. I shouldn't
even need to say
# coding:UTF-8
And, the file is saved as Unicode.
When a filed is saved, shouldn't it be in a specific encoding? I don't
see how you can save your file 'as
On Tue, Jan 19, 2010 at 10:39 PM, Rainer Grimm r.gr...@science-computing.de
wrote:
Hallo,
you can also look at list comprehension as syntactic sugar for the
functions map and filter. The two functions from the functional world
can be expressed in a comprehensive way with list comprehension.
On Tue, Jan 19, 2010 at 11:32 PM, Stephen Hansen apt.shan...@gmail.comwrote:
I really don't think you can call comprehensions as mere syntactic sugar,
Err, I misspoke.
I don't really think you can call comprehensions mere syntactic sugar /for
map and filter/.
It IS mere syntactic sugar for
I have a byte string (Python 2.x string), e.g.:
s = g%$f yg\n1\05
assert len(s) == 10
I wish to convert it to a long integer, treating it as base-256.
Currently I'm using:
def makelong(s):
n = 0
for c in s:
n *= 256
n += ord(c)
return n
which gives:
makelong(s)
Steven D'Aprano, 20.01.2010 07:12:
On Wed, 20 Jan 2010 05:25:22 +0100, Alf P. Steinbach wrote:
That is a good argument for not doing the expanding buffer thing.
But such buffers may be generally present anyway, resulting from
optimization of +.
As near as I can determine, the CPython
Gnarlodious gnarlodi...@gmail.com wrote in message
news:646ab38b-0710-4d31-b9e1-8a6ee7bfa...@21g2000yqj.googlegroups.com...
Well, Python 3 is supposed to be all Unicode by default. I shouldn't
even need to say
# coding:UTF-8
Yes, in Python 3, an absence of a 'coding' line assumes UTF-8.
Yukihiro Nakadaira yukihiro.nakada...@gmail.com added the comment:
In other words, I think the correct thing to do is to delete that if test.
I think so too.
Do you have a case where the code produces incorrect behavior that your patch
turns into correct behavior?
No, I don't. I just
New submission from Kent Yip yes...@gmail.com:
IDLE will hang when a tooltip shows in a Linux system (Ubuntu).
do this:
t = (1,2,3)
len(t)
it will hang after the closing ')', when you press return nothing will happen
or when you press any keys, it won't show up.
However, you can work
New submission from Doron Tal doron.tal.l...@gmail.com:
I've encountered a hung of python process for more than a second. It appears
that the stall happens due to time.strftime call, which internally opens a file
('/etc/localtime'). I think it is best if the GIL would have been released to
1 - 100 of 125 matches
Mail list logo