Announcing CherryPy 3.1.0 beta3. The first beta was released about 3
months ago. There was a beta2 release that went largely unannounced
in between. Here is a list of some of the changes from beta1 to
beta3.
Bugfixes:
* log.screen now sends error messages to stderr
Announcing CherryPy 3.0.3. This release fixes two important bugs.
1) Security vulnerability when using file-based sessions
(http://www.cherrypy.org/ticket/744).
2) A memory leak (http://www.cherrypy.org/ticket/718).
A full log of the changes since 3.0.2 can be found here:
On Sat, 12 Jan 2008 14:23:52 -0800, Richard Szopa wrote:
However, I am very surprised to learn that
super_object.__getattr__(name)(*args, **kwargs)
getattr(super_object, name)(*args, **kwargs)
are not equivalent. This is quite odd, at least when with len()
and .__len__, str() and
Please keep discussion on the list..
I'm not sure if I understand your question correctly but maybe this will
help:
If you want code to be run upon creating an instance of your class you
would use __init__. Most common examples include setting attributes on
the instance and doing
It seems to me that filenames are like snapshots of the locales where they
originated.
On Unix, yes. On Windows, NTFS and VFAT represent file names as Unicode
strings always, independent of locale. POSIX file names are byte
strings, and there isn't any good support for recording what their
In article
[EMAIL PROTECTED],
John Machin [EMAIL PROTECTED] wrote:
snip
You obviously haven't tried float(n / m), or you wouldn't be asking.
True, it was a very silly idea.
Most legible and slowest first:
1. float(n) / float(m)
2. n / float(m)
3. 1.0 * n / m
Recommendation: go with
In article
[EMAIL PROTECTED],
Roberto Bonvallet [EMAIL PROTECTED] wrote:
Put this at the beginning of your program:
from __future__ import division
This forces all divisions to yield floating points values:
Thanks for the tip. May I assume the div operator will still behave as
On Jan 13, 8:43 pm, Odysseus [EMAIL PROTECTED] wrote:
In article
[EMAIL PROTECTED],
Roberto Bonvallet [EMAIL PROTECTED] wrote:
Put this at the beginning of your program:
from __future__ import division
This forces all divisions to yield floating points values:
Thanks for the
On 11 ene, 22:51, Mike [EMAIL PROTECTED] wrote:
On Jan 11, 3:31 pm, Gabriel [EMAIL PROTECTED] wrote:
Hi all !
I'm developing a math program that shows graphics of functions.
I would hear suggestions about the way of drawing 2D .
Thanks a lot for your answers.
- Gabriel -
That's
In article [EMAIL PROTECTED],
Gary Herron [EMAIL PROTECTED] wrote:
Odysseus wrote:
snip
print '%2u %6u %4.2f' % \
(i, wordcounts[i], 100.0 * wordcounts[i] / wordcounts[0])
Using 4.2 is the problem. The first digit (your 4) give the total
number of characters to use for the
Martin,
Thanks, food for thought indeed.
On Unix, yes. On Windows, NTFS and VFAT represent file names as Unicode
strings always, independent of locale. POSIX file names are byte
strings, and there isn't any good support for recording what their
encoding is.
I get my filenames from two
Odysseus wrote:
Hello, group: I've just begun some introductory tutorials in Python.
Taking off from the word play exercise at
http://www.greenteapress.com/thinkpython/html/book010.html#toc96
I've written a mini-program to tabulate the number of characters in each
word in a file. Once
BUT: active FTP does not just send the data to the port that was in
the random port that was sent to the server... it addresses to the port
you sent, but it sends its data response FROM port 20. This means the
response looks like a totally unsolicited connection attempt from the
When did this list become a politics dialog? Please keep on topic Python!
Thanks
James
On Jan 12, 2008 8:07 PM, Joe Riopel [EMAIL PROTECTED] wrote:
On Jan 12, 2008 2:00 PM, radiosrfun [EMAIL PROTECTED] wrote:
Whether we agree on tactics or not - if it come to a battlefield with the
two of
I m trying to program the paypal for accepting payments
Aret there python libraries for the same
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Michael Sparks wrote:
The behaviour you're seeing sounds odd (which is hopefully
encouraging :-), but it's not clear from the description whether
its a bug in your code or Kamaelia. One question I really have as
a result is what version are you using?
Oh sorry, it's the versions from MegaPack
-On [20080112 23:30], Dan Upton ([EMAIL PROTECTED]) wrote:
Why was this ever on the Python list (I assume it started as spam),
and why on earth has it continued?
The Python mailinglist is a gateway to/from comp.lang.python for all I know.
So anything idiotic getting posted there might make its
-On [20080113 01:41], Erik Lind ([EMAIL PROTECTED]) wrote:
I'm new to Python, and OOP. I've read most of Mark Lutz's book and more
online and can write simple modules, but I still don't get when __init__
needs to be used as opposed to creating a class instance by assignment.
I personally tend
hi, if I want sort each line ,by the last part,of a file, below is the
source.
from operator import itemgetter
content = (line.split() for line in file('foo.txt', 'rb'))
for cursor, line in enumerate(sorted(content, key = itemgetter(-1),
reverse = True)):
print cursor, ' '.join(line)
the
I have found that os.listdir() does not always return unicode objects when
passed a unicode path. Sometimes byte strings are returned in the list,
mixed-in with unicodes.
Yes. It does so when it fails to decode the byte string according to the
file system encoding (which, in turn, bases on
Martin,
Yes. It does so when it fails to decode the byte string according to the
file system encoding (which, in turn, bases on the locale).
That's at least one way I can weed-out filenames that are going to give me
trouble; if Python itself can't figure out how to decode it, then I can also
So on *your* system, today: what encoding are the filenames encoded in?
We are not talking about arbitrary files, right, but about font files?
What *actual* file names do these font files have?
On my system, all font files have ASCII-only file names, even if they
are for non-ASCII
lotrpy wrote:
key = int(itemgetter(0)) is wrong, key = lambda x:int(x[0]) works.
but s.b. told me itemgetter execute more quickly .
so you're more interested in speed than in correctness? ;-)
operator.itemgetter is a function factory that creates a *function* that
fetches the given item
I would advise against such a strategy. Instead, you should first
understand what the encodings of the file names actually *are*, on
a real system, and draw conclusions from that.
I don't follow you here. The encoding of file names *on* a real system are
(for Linux) byte strings of
On Jan 12, 8:33 pm, Fredrik Lundh [EMAIL PROTECTED] wrote:
marcstuart wrote:
How do I divide a list into a set group of sublist's- if the list is
not evenly dividable ? consider this example:
x = [1,2,3,4,5,6,7,8,9,10]
y = 3 # number of lists I want to break x into
z = y/x
On Saturday 12 January 2008 21:34 Martin Marcher wrote:
a) Is sqlite included in the python default distribution
b) In real life can I consider (on linux) that an installation of python
includes the sqlite stuff?
forgive my that was pebcack. I wasn't reading the docs fully so I thought I
need
lotrpy [EMAIL PROTECTED] writes:
if i want sort each line by the first part,(it's a integer, in fact).
don't know how to do it with itemgetter.
key = int(itemgetter(0)) is wrong, key = lambda x:int(x[0]) works.
but s.b. told me itemgetter execute more quickly .
Use lambda when it works
Erik Lind wrote:
I'm new to Python, and OOP. I've read most of Mark Lutz's book and more
online and can write simple modules, but I still don't get when __init__
needs to be used as opposed to creating a class instance by assignment.
nothing is ever created by plain assignment in Python; to
Jeroen Ruigrok van der Werven wrote:
I personally tend to see __init__ or __new__ as equivalent to what other
languages call a constructor.
(And I am sure some people might disagree with that. ;))
given that they do different things, I'm not sure it's that helpful to
describe them *both*
On Jan 13, 8:59 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Sat, 12 Jan 2008 14:23:52 -0800, Richard Szopa wrote:
However, I am very surprised to learn that
super_object.__getattr__(name)(*args, **kwargs)
getattr(super_object, name)(*args, **kwargs)
are not equivalent.
Well as I understand your problem now,
you would not like all instances of an specific object that are still alive,
but all references to an object (created somewhere, sometimes) in an local
context (stack frame),
that are accessible from 'that' context ( but also from many others).
However in
I guess I'm confused by that. I can ls them, so they appear and thus have
characters displayed. I can open and cat them and thus the O/S can access
them, but I don't know whether their characters are strictly in ascii-limits
or drawn from a larger set like unicode. I mean, I have seen
thebjorn wrote:
Eh...
oh, forgot that it was pulling requirements out of thin air week on
c.l.python.
def chop(lst, length):
n = len(lst) / length
z = [lst[i:i+n] for i in xrange(0, len(lst), n)]
if len(z[-1]) n and len(z) 1:
z[-2].extend(z.pop(-1))
return z
Jeroen Ruigrok van der Werven [EMAIL PROTECTED] writes:
-On [20080113 01:41], Erik Lind ([EMAIL PROTECTED]) wrote:
I'm new to Python, and OOP. I've read most of Mark Lutz's book and
more online and can write simple modules, but I still don't get
when __init__ needs to be used as opposed
On Jan 13, 1:05 pm, thebjorn [EMAIL PROTECTED]
wrote:
On Jan 12, 8:33 pm, Fredrik Lundh [EMAIL PROTECTED] wrote:
marcstuart wrote:
How do I divide a list into a set group of sublist's- if the list is
not evenly dividable ? consider this example:
x = [1,2,3,4,5,6,7,8,9,10]
y = 3
On 1月13日, 下午8时32分, Hrvoje Niksic [EMAIL PROTECTED] wrote:
Use lambda when it works better for you, the speed difference is
marginal in practice anyway. itemgetter is not (and was never
intended to be) a general substitute for functions, as you've
discovered.
The marginal speed difference
thebjorn [EMAIL PROTECTED] writes:
Perhaps something like this?
def chop(lst, length):
from itertools import islice
it = iter(lst)
z = [list(islice(it, length)) for i in xrange(1 + len(lst) // length)]
if len(z) 1:
z[-2].extend(z.pop()) # the last item will be
On Jan 13, 2:02 pm, Fredrik Lundh [EMAIL PROTECTED] wrote:
thebjorn wrote:
Eh...
oh, forgot that it was pulling requirements out of thin air week on
c.l.python.
Well, the OP requirements were to control the number of chunks, not
the size of them, so I guess we both got it wrong initially.
If you can all ls them, and if the file names come out right, then
they'll have the same encoding.
Could it not be that the app doing the output (say konsole) could be
displaying a filename as best as it can (doing the ignore/replace) trick and
using whatever fonts it can reach) and this would
A built-in exceptions, when raised, would print traceback that points
out the offending code, like this:
Traceback (most recent call last):
File F:\dir\code.py, line 43, in module
a = 1/0 ---
ZeroDivisionError: integer division or modulo by zero
a user-made exception, when raised, would
On Jan 13, 1:51 pm, Richard Szopa [EMAIL PROTECTED] wrote:
On Jan 13, 8:59 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Sat, 12 Jan 2008 14:23:52 -0800, Richard Szopa wrote:
However, I am very surprised to learn that
super_object.__getattr__(name)(*args, **kwargs)
On Jan 13, 4:14 pm, Lie [EMAIL PROTECTED] wrote:
A built-in exceptions, when raised, would print traceback that points
out the offending code, like this:
Traceback (most recent call last):
File F:\dir\code.py, line 43, in module
a = 1/0 ---
ZeroDivisionError: integer division or
i am new guy to learn python,also for this discussion group, i am
chinese.
nice to meet you, everyone.
--
http://mail.python.org/mailman/listinfo/python-list
Hi everyone! In my application (under windows) I'm using a
wx.checklistbox. I would like the background color of an item to
become red whenever an EVT_LISTBOX_DCLICK occurs. Is there any simple
way to achieve it?
Thanks in advance.
--
http://mail.python.org/mailman/listinfo/python-list
thebjorn wrote:
On Jan 12, 6:50 pm, Giampaolo Rodola' [EMAIL PROTECTED] wrote:
Update.
I found a way for getting the home directory of the user but it
requires to validate the user by providing username+password:
def get_homedir(username, password):
token = win32security.LogonUser(
On Jan 12, 6:50 pm, Giampaolo Rodola' [EMAIL PROTECTED] wrote:
Update.
I found a way for getting the home directory of the user but it
requires to validate the user by providing username+password:
def get_homedir(username, password):
token = win32security.LogonUser(
username,
Could it not be that the app doing the output (say konsole) could be
displaying a filename as best as it can (doing the ignore/replace) trick and
using whatever fonts it can reach) and this would disguise the situation?
No. It may use replacement characters (i.e. a question mark, or an empty
No. It may use replacement characters (i.e. a question mark, or an empty
square box), but if you don't see such characters, then the terminal has
successfully decoded the file names. Whether it also correctly decoded
them is something for you to check (i.e. do they look right?)
Okay.
So, the
Jorgen Bodde [EMAIL PROTECTED] wrote:
I am trying to make a debian package. I am following the tutorial by
Horst Jens
(http://showmedo.com/videos/video?name=linuxJensMakingDebfromSeriesID=37)
and it is very informative. However one thing my app has and his
doesn't, is multiple python files
What happens if there is a filename that cannot be represented in it's
entirety? i.e. every character is 'replaced'. Does it simply vanish, or does
it appear as ? ? :)
The latter. I did open(u\u20ac\u20ac,w) in an UTF-8 locale, then did
LANG=C ls, and it gave me ?? (as the two
Martin,
I want to thank you for your patience, you have been sterling. I have an
overview this evening that I did not have this morning. I have started fixing
my code and the repairs may not be that extreme after all.
I'll hack-on and get it done. I *might* bug you again, but I'll resist at
On Jan 13, 3:03 pm, bill.wu [EMAIL PROTECTED] wrote:
i am new guy to learn python,also for this discussion group, i am
chinese.
nice to meet you, everyone.
Hi and welcome onboard.
If you're new to programming in general, you may want to join the
tutor mailing-list.
Well, that didn't take me long... Can you help with this situation?
I have a file named MÖgul.pog in this directory:
/home/donn/.fontypython/
I set my LANG=C
Now, I want to open that file from Python, and I create a path with
os.path.join() and an os.listdir() which results in this byte string:
Lie [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
A built-in exceptions, when raised, would print traceback that points
out the offending code, like this:
Traceback (most recent call last):
File F:\dir\code.py, line 43, in module
a = 1/0 ---
ZeroDivisionError: integer
Dear Fredik,
I have tried to copy PIL folder into my application folder. I am using
Tkinter also, and when I want to put an image as label I do:
photo1 = Image.open(rMyimage.gif)
photo = ImageTk.PhotoImage(photo1)
llogo =Label(root, image=photo,bg=white,height=60)
And I receive an
I'm having some cross platform issues with timing loops. It seems
time.time is better for some computers/platforms and time.clock others, but
it's not always clear which, so I came up with the following to try to
determine which.
import time
# Determine if time.time is better than
j igisbert.etra-id wrote:
this. I have download Imaging-1.1.6 source code, and I found PIL folder,
but not binary file. If I download windows exe installer, it works
great, but I want to install manually for installing it on my PDA
as the name implies, the source code distribution
On Jan 12, 9:03 am, Landon [EMAIL PROTECTED] wrote:
Hi, I'm a freshman in college and I'm going to be taking an intro to
programming course next semester which mainly uses Python, so I
thought it might be a good time to pick up Python beyond the scope of
the class as well. The text book for
Now, I want to open that file from Python, and I create a path with
os.path.join() and an os.listdir() which results in this byte string:
paf = ['/home/donn/.fontypython/M\xc3\x96gul.pog']
I *think* that the situation is impossible because the system cannot resolve
the correct filename
Now you are mixing two important concepts - the *contents*
of the file with the *name* of the file.
Then I suspect the error may be due to the contents having been written in
utf8 from previous runs. Phew!
It's bedtime on my end, so I'll try it again when I get a chance during the
week.
My PDA runs with Windows Mobile 2003 SE could you or someone please
explain me what to do? Thanks a lot for your effort.
-Original Message-
From: Fredrik Lundh [EMAIL PROTECTED]
To: python-list@python.org
Date: Sun, 13 Jan 2008 21:18:37 +0100
Subject: *SPAM*: 04.6/4.0 - Re:
Hi,
I have created a class that wraps a numpy array of custom objects. I
would like to be able to slice respective objects (without copying the
array if possible).
I have browsed the doc and found some hints at __getitem__. However, I
still do not grasp how to do it. How do I implement
On Jan 14, 7:05 am, Ron Adam [EMAIL PROTECTED] wrote:
I'm having some cross platform issues with timing loops. It seems
time.time is better for some computers/platforms and time.clock others, but
Care to explain why it seems so?
it's not always clear which, so I came up with the following to
Martin Manns wrote:
Hi,
I have created a class that wraps a numpy array of custom objects. I
would like to be able to slice respective objects (without copying the
array if possible).
I have browsed the doc and found some hints at __getitem__. However, I
still do not grasp how to do it.
John Machin wrote:
AFAICT that was enough indication for most people to use time.clock on
all platforms ...
which was unfortunate, given that time.clock() isn't even a proper clock
on most Unix systems; it's a low-resolution sample counter that can
happily assign all time to a process that
Alex K [EMAIL PROTECTED] wrote:
Does anyone know if the python shell supports paging or if I should
look into iPython? Thank you so much.
Paging is an overloaded term. What do you mean, exactly? Do you mean
something like piping the output into more? The Python shell does that
for the help
On Jan 12, 2:58 am, Jeroen Ruigrok van der Werven [EMAIL PROTECTED]
nomine.org wrote:
-On [20080112 08:38], Gowri ([EMAIL PROTECTED]) wrote:
Actually, I have one other problem after all this. I see that if I try
to construct JSON output as above, it is of the form
[{'isbn': u'1-56592-724-9',
On Sun, 13 Jan 2008 16:03:16 -0600
Robert Kern [EMAIL PROTECTED] wrote:
Martin Manns wrote:
Hi,
I have created a class that wraps a numpy array of custom objects. I
would like to be able to slice respective objects (without copying
the array if possible).
I have browsed the doc
Giampaolo Rodola' wrote:
Hi all,
I'm trying to use the pywin32 extension to find out the user's home
directory but currently I didn't find a solution yet.
What I'd need to do is not getting the home directory of the currently
logged in user but something like:
get_homedir(frank)
On Jan 14, 2:03 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
On Jan 13, 3:03 pm, bill.wu [EMAIL PROTECTED] wrote:
i am new guy to learn python,also for this discussion group, i am
chinese.
nice to meet you, everyone.
Hi and welcome onboard.
If you're new to programming in general,
On Jan 11, 7:14 pm, Fredrik Lundh [EMAIL PROTECTED] wrote:
the core zlib library (libz.so) isn't installed on your machine.
but in my machine there is file
-rwxr-xr-x 1 bin bin48576 Sep 20 2006 /usr/local/lib/
python2.5/lib-dynload/zlib.so
if i have to install zlib library
Martin P. Hellwig wrote:
Giampaolo Rodola' wrote:
Hi all,
I'm trying to use the pywin32 extension to find out the user's home
directory but currently I didn't find a solution yet.
What I'd need to do is not getting the home directory of the currently
logged in user but something like:
In article [EMAIL PROTECTED],
GeneralCody [EMAIL PROTECTED] wrote:
On 2008-01-12 08:03:42 +0100, Landon [EMAIL PROTECTED] said:
Hi, I'm a freshman in college and I'm going to be taking an intro to
programming course next semester which mainly uses Python, so I
thought it might be a good
Martin Manns wrote:
On Sun, 13 Jan 2008 16:03:16 -0600
Robert Kern [EMAIL PROTECTED] wrote:
Martin Manns wrote:
Hi,
I have created a class that wraps a numpy array of custom objects. I
would like to be able to slice respective objects (without copying
the array if possible).
I have
Hi,
I'm trying to run an asynchronous FTP server I wrote into a thread for
being able to run a test suite against it.
The code below is the threaded FTP server code I'm using:
--- snippet ---
class FTPd(threading.Thread):
def __init__(self):
self.active = False
John Machin wrote:
On Jan 14, 7:05 am, Ron Adam [EMAIL PROTECTED] wrote:
I'm having some cross platform issues with timing loops. It seems
time.time is better for some computers/platforms and time.clock others, but
Care to explain why it seems so?
it's not always clear which, so I came
Fredrik Lundh wrote:
John Machin wrote:
AFAICT that was enough indication for most people to use time.clock on
all platforms ...
which was unfortunate, given that time.clock() isn't even a proper clock
on most Unix systems; it's a low-resolution sample counter that can
happily assign
Hi,
Im using windows XP and I was wondering if anyone had any experience in
compiling (using py2exe) the official bittorrent client (
http://download.bittorrent.com/dl/BitTorrent-5.2.0.tar.gz ) or any
bittorrent client open source and written in python. I ask since I am
trying to make several
I m trying to create something simple a mailing list similar to yahoo groups
I m stumbling at the part where the python recieves messages via say
[EMAIL PROTECTED]
how to make python recieve emails and process it
after that it is straight forward processing in python inserting in db etc
--
ok i dont want to write an mta
i want to use another mta
to recieve emails on say -
[EMAIL PROTECTED]
so can i start reading the emails to python from that mta
How to set this up to read messages from the mta
sending out email
we are using sendmail so we ll continue using that for now
thanks
[EMAIL PROTECTED] wrote:
I m trying to create something simple a mailing list similar to yahoo
groups
I m stumbling at the part where the python recieves messages via say
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
how to make python recieve emails and process it
after that it is straight
On 2008-01-12, Jorgen Bodde [EMAIL PROTECTED] wrote:
Question 1. Where do I put the bulk of python scripts in a normal
linux environment?
Question 2. Should I use *.pyc rather then *.py files to speed up
executing as the user cannot write to /usr/bin or any other dir in the
system and
Christian Heimes added the comment:
The new patch is using a struct sequence (like the result of os.stat):
import sys
sys.flags
sys.flags (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
dir(sys.flags)
['__add__', '__class__', '__contains__', '__delattr__', '__doc__',
'__eq__', '__ge__',
Ka-Ping Yee added the comment:
Committed the patch in revision 59939.
I'm not clear how it was determined that importing every module was
necessary in order to list the modules or scan their synopsis lines
(this seems to have happened in revision 45510). This can probably
be made more
Andrew Dalke added the comment:
Ahh, so the bug here that the environ dict should use neither UserDict nor
dict, it should implement the core {get,set,del}item and keys and use
DictMixin.
Martin mentioned that the patch doesn't support setdefault. He didn't note
though that the current code
Georg Brandl added the comment:
Backed out again in r59940 -- test_ctypes fails in test_incomplete.py.
Armin reports that with his original patch on 2.4, this test passes.
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1700288
Kevin Jacobs added the comment:
All tests passed when I first ported Armin's patch to 2.6. I'll have a
chance to look into this later in the week. If anyone gets to it first,
please summarize your findings here to avoid duplication of effort.
_
Tracker
Georg Brandl added the comment:
FTR, I'm currently removing all 2.5isms from Sphinx.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1472
__
___
Python-bugs-list mailing list
Christian Heimes added the comment:
Why was the mpz module removed from Python 2.4 in the first place? 2.3
has it.
I see three way to implement the option:
* Let somebody implement a mpz type as a 3rd party extension.
* Let somebody implement a mpt type and ship it with the Python core
*
Guido van Rossum added the comment:
Can't you use a namedtuple? Then printing it would show the names of
the flags...
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1816
__
___
Christian Heimes added the comment:
Guido van Rossum wrote:
Can't you use a namedtuple? Then printing it would show the names of
the flags...
... and increase the startup costs of Python by loading several
additional modules. The collections module imports _collections,
operator and keyword.
Guido van Rossum added the comment:
I'd rather see a better repr function for the
sequence types.
Agreed. It's kind of unfortunate that we have two implementations for
the same concept, one in C and one in Python.
__
Tracker [EMAIL PROTECTED]
Christian Heimes added the comment:
I've coded sys.flags for my per-user site-packages PEP. I could make it
a function but the function would be called by site.py on every startup.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1816
Achim Gaedke added the comment:
sometimes offset is None...
Example:
def blub(bla, blub=None, blabla):
bla
causes:
non-default argument follows default argument
Added file: http://bugs.python.org/file9150/compile_test.py
__
Tracker [EMAIL PROTECTED]
New submission from Raymond Hettinger:
Here's a proof-of-concept patch. If approved, will change from
generator form to match the other readers and will add a test suite.
The idea corresponds to what is currently done by the dict reader but
returns a space and time efficient named tuple
Raymond Hettinger added the comment:
Let's do this. It is a nice simplification and makes the sort tools
easier to learn and use.
--
assignee: - rhettinger
resolution: - accepted
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1771
Antoine Pitrou added the comment:
Unless I'm mistaken, the patch provides only half of the solution: the
stringToLong part, but not longToString.
I agree this feature is interesting, not for optimization but becomes it
avoids using clunky ways (long - hex - bin) to implement something simple.
Christian Heimes added the comment:
Does anybody see a problem with this repr slot implementation for
structseq? It gives this output:
os.stat(.)
posix.stat_result st_mode=16832, st_ino=11666571L, st_dev=65025L,
st_nlink=20, st_uid=1000, st_gid=1000, st_size=4096L,
st_atime=1200261754,
Jeffrey Yasskin added the comment:
_binary_float_to_ratio: Oops, fixed.
Rational() now equals 0, but I'd like to postpone Rational('3/2') until
there's a demonstrated need. I don't think it's as common a use as
int('3'), and there's more than one possible format, so some real world
experience
Christian Heimes added the comment:
The new patch adds the -s option, checks for getuid() == geteuid() and
adds sys.flags (see #1816).
Added file: http://bugs.python.org/file9153/trunk_usersite3.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1799
1 - 100 of 127 matches
Mail list logo