Georg Brandl ge...@python.org added the comment:
The result of 7 / 200 is easy to explain -- this is how integer division works
in Python 2. (To get a floating result, one of the numbers must be a float.)
200 % 7 giving 7 however is strange. Are you sure this is what you calculated?
Eric Smith e...@trueblade.com added the comment:
Which version of python? Could you run this from the command line and paste the
complete session, including the version info that python prints on startup?
--
nosy: +eric.smith, mark.dickinson
___
Mark Dickinson dicki...@gmail.com added the comment:
Seconding Eric's comment. This is what I get on my machine; can you cut and
paste the equivalent output on yours (including whatever else is required to
reproduce the results you describe)
Python 2.6.1 (r261:67515, Feb 11 2010, 15:47:53)
Georg Brandl ge...@python.org added the comment:
The bug title interestingly says 7%200, which does result in 7. I therefore
think the OP just confused the order of operands for %.
--
resolution: - invalid
status: open - closed
___
Python tracker
On Thu, 2010-10-14 at 22:43 -0700, James Matthews wrote:
Hi,
I have this code http://gist.github.com/627687 (I don't like pasting
code into the mailing list).
Yes, but it makes it harder to discuss the ode and makes the archive
that much more useless. It's only a couple of lines, here ya
On 10/15/2010 3:11 AM, Ryan Kelly wrote:
On Thu, 2010-10-14 at 22:43 -0700, James Matthews wrote:
Hi,
I have this code http://gist.github.com/627687 (I don't like pasting
code into the mailing list).
Yes, but it makes it harder to discuss the ode and makes the archive
that much more useless.
Hi,
I have this code http://gist.github.com/627687 (I don't like pasting code
into the mailing list). I am wondering why the try except is taking longer.
I assume that if the IF statement checks every iteration of the loop (1000
times) shouldn't it be slower?
James
--
On Tue, 05 Oct 2010 16:17:57 +0200
Jonas H. jo...@lophus.org wrote:
Right now I have this minimal struct:
static PyTypeObject StartResponse_Type = {
PyObject_HEAD_INIT(PyType_Type)
0, /* ob_size */
start_response, /* tp_name */
On 10/06/2010 02:01 PM, Antoine Pitrou wrote:
It shouldn't. Are you sure you're calling PyType_Ready in the module
initialization routine?
Yeah. The problem was that the type struct was declared 'static' in
another module so the changes `PyType_Ready` made to the struct weren't
applied
On 10/04/2010 11:41 PM, Antoine Pitrou wrote:
Well, it should work, but you have to call PyType_Ready() to fill in
the NULL fields with default values (for those where it's necessary).
Does it solve it for you?
Yes, thank you! Although I do not understand which fields I have to
provide. I
On 10/03/2010 11:52 PM, Antoine Pitrou wrote:
You probably have a problem in your tp_dealloc implementation.
`tp_dealloc` is NULL...
--
http://mail.python.org/mailman/listinfo/python-list
On 10/04/2010 10:46 AM, Jonas H. wrote:
On 10/03/2010 11:52 PM, Antoine Pitrou wrote:
You probably have a problem in your tp_dealloc implementation.
`tp_dealloc` is NULL...
Alright, `tp_dealloc` must not be NULL because it's called by
`_Py_Dealloc`. The C-API tutorial is quite confusing
On Mon, 04 Oct 2010 23:30:58 +0200
Jonas H. jo...@lophus.org wrote:
[...] here's a minimal, but __complete__, module that defines a new type:
[...]
static PyTypeObject noddy_NoddyType = {
[...]
0, /*tp_dealloc*/
[...]
};
So I thought
On 10/03/2010 01:16 AM, Antoine Pitrou wrote:
You should check that you aren't doing anything wrong
with env and start_response (like deallocate them forcefully).
I commented out the `Py_DECREF(start_response)` after the `app` call and
the crash was gone. `start_response` is created via
On Sun, 03 Oct 2010 14:44:32 +0200
Jonas H. jo...@lophus.org wrote:
On 10/03/2010 01:16 AM, Antoine Pitrou wrote:
You should check that you aren't doing anything wrong
with env and start_response (like deallocate them forcefully).
I commented out the `Py_DECREF(start_response)` after the
On 10/03/2010 03:47 PM, Antoine Pitrou wrote:
You shouldn't call PyObject_FREE yourself, but instead rely on
Py_DECREF to deallocate it if the reference count drops to zero.
So, instead of commenting out Py_DECREF and keeping PyObject_FREE, I'd
recommend doing the reverse. That way, if a
On Sun, 03 Oct 2010 16:33:48 +0200
Jonas H. jo...@lophus.org wrote:
Humm. Now the behaviour is as follows:
with assignment to local variable
--
* start_response = PyObject_NEW(...) - start_response-ob_refcnt=1
* wsgiapp(environ, start_response) -
Hello list,
I have a really weird reference problem with `sys.exc_info`, and, if I'm
right, function frames.
The software in question is bjoern, a WSGI web server written in C,
which you can find at http://github.com/jonashaag/bjoern.
This WSGI application:
def app(env, start_response
()
[...]
Now that is weird. The only difference between the two functions is that
the second one (with the assignment) keeps a reference to the exc_info
tuple in the function frame.
Which creates a reference cycle, since you now have a local variable
which has a reference to the exception traceback which
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
Fix checked into release31-maint (r85046).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9947
___
fairness sake that method is probably never executed
from more than one thread.
--
assignee: vinay.sajip
files: logging-config-threadsafety.patch
keywords: patch
messages: 117370
nosy: aronacher, vinay.sajip
priority: normal
severity: normal
status: open
title: Weird locking in logging
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
Fix checked into py3k and release27-maint, r85013.
Thanks!
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9947
New submission from Antoine Pitrou pit...@free.fr:
I haven't investigated but this is weird (especially the fact that it doesn't
*always* happen). There might be a problem with SETUP_WITH or perhaps the
method cache:
import bz2
f = bz2.BZ2File('foo.bz2', 'wb')
with f: pass
...
Traceback
Antoine Pitrou pit...@free.fr added the comment:
Actually, it is because bz2 doesn't call PyType_Ready() but instead sets some
field manually. Perhaps we could have a guard somewhere that raises a fatal
error when a C extension type hasn't been properly readied?
In the meantime, this patch
Benjamin Peterson benja...@python.org added the comment:
2010/9/23 Antoine Pitrou rep...@bugs.python.org:
Antoine Pitrou pit...@free.fr added the comment:
Actually, it is because bz2 doesn't call PyType_Ready() but instead sets some
field manually. Perhaps we could have a guard somewhere
Antoine Pitrou pit...@free.fr added the comment:
Patch committed in r84980 (3.2), r84981 (3.1) and r84982 (2.7).
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9928
Any ideas?
Try running the postinstall script by hand.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
A colleague gets this error while testing a bdist wininst installer under
windows 7 professional.
This is on the page where the Post install script output appears. In the upper
part I see
Postinstall script finished.
Click the Finish button to exit the setup wizard.
In the bottom panel
Hello,
Lets say that I want to feed an optional list to class constructor:
class Family():
def __init__(self, fName, members = []):
self.fName = fName
self.members = members
Now, lets add members to two different instances of Family:
f1 = Family(Smith)
Jonas Nilsson wrote:
Lets say that I want to feed an optional list to class constructor:
class Family():
def __init__(self, fName, members = []):
Why on earth is the output ['Bill', 'Joe']!? Is there a simple
solution that separates f1 and f2 without forcing me to write code for
the
On Tue, Aug 10, 2010 at 4:58 AM, Jonas Nilsson j...@spray.se wrote:
Hello,
Lets say that I want to feed an optional list to class constructor:
class Family():
def __init__(self, fName, members = []):
self.fName = fName
self.members = members
Now, lets
On 10 Ago, 13:58, Jonas Nilsson j...@spray.se wrote:
Hello,
Lets say that I want to feed an optional list to class constructor:
class Family():
def __init__(self, fName, members = []):
self.fName = fName
self.members = members
Now, lets add members
Hi,
On 2010-08-10 17:01, Francesco Bochicchio wrote:
There used to be a very nice (also graphic) explanationor this
somewhere on the web, but my googling skills failed me this time,
so instead I'll show you the concept using your own code:
Probably this isn't the page you're referring to, but
On 10 Ago, 13:58, Jonas Nilsson j...@spray.se wrote:
You stumbled in two python common pitfalls at once :-)
One, the default arguments issue, was already pointed to you.
The other one is that python variables are just names for objects.
Assigning a variable never mean making a copy, it
On 10 Ago, 17:57, Stefan Schwarzer sschwar...@sschwarzer.net wrote:
Hi,
On 2010-08-10 17:01, Francesco Bochicchio wrote:
There used to be a very nice (also graphic) explanationor this
somewhere on the web, but my googling skills failed me this time,
so instead I'll show you the concept
x = {type:folder, name:sonicbot, data:[{type:folder,
name:SonicMail, data:[{type:file, name:bbcode.py,
compressed:False, contents:blahblahfilecontents}]}]}
print x
def setindict(dictionary, keys, value) :
if len(keys) == 1 :
if keys[0].isdigit() and int(keys[0]) == len(dictionary) :
On Sun, Jul 25, 2010 at 5:08 PM, Westly Ward sonicrules1...@gmail.com wrote:
x = {type:folder, name:sonicbot, data:[{type:folder,
name:SonicMail, data:[{type:file, name:bbcode.py,
compressed:False, contents:blahblahfilecontents}]}]}
print x
def setindict(dictionary, keys, value) :
if
On Mon, Jun 7, 2010 at 6:30 AM, Peter Otten __pete...@web.de wrote:
kirby.ur...@gmail.com wrote:
On Jun 4, 9:47 am, Peter Otten __pete...@web.de wrote:
I can provoke the error in naked Python 3 by changing the
Example.__module__ attribute:
Python 3.1.1+ (r311:74480, Nov 2 2009, 15:45:00)
Fabio Zadrozny wrote:
On Mon, Jun 7, 2010 at 6:30 AM, Peter Otten __pete...@web.de wrote:
kirby.ur...@gmail.com wrote:
On Jun 4, 9:47 am, Peter Otten __pete...@web.de wrote:
I can provoke the error in naked Python 3 by changing the
Example.__module__ attribute:
Python 3.1.1+ (r311:74480,
kirby.ur...@gmail.com wrote:
On Jun 4, 9:47 am, Peter Otten __pete...@web.de wrote:
I can provoke the error in naked Python 3 by changing the
Example.__module__ attribute:
Python 3.1.1+ (r311:74480, Nov 2 2009, 15:45:00)
[GCC 4.4.1] on linux2
Type help, copyright, credits or license for
]
pickle.dump(test,f)
f.close()
Any other Eclipse users out there who can at least duplicate this
weirdness?
Kirby Urner
in Portland Keep Portland Weird Oregon
--
http://mail.python.org/mailman/listinfo/python-list
kirby.ur...@gmail.com wrote:
Here we are in an Eclipse pydev console, running Python 3.1.2. For
the most part, everything is working great.
However...
import sys; print('%s %s' % (sys.executable or sys.platform,
sys.version))
C:\Python31\python.exe 3.1.2 (r312:79149, Mar 21 2010,
On Jun 4, 9:47 am, Peter Otten __pete...@web.de wrote:
I can provoke the error in naked Python 3 by changing the
Example.__module__ attribute:
Python 3.1.1+ (r311:74480, Nov 2 2009, 15:45:00)
[GCC 4.4.1] on linux2
Type help, copyright, credits or license for more information.
import
On May 15, 3:41 am, Dave Angel da...@ieee.org wrote:
cerr wrote:
Hi There,
I got following code:
start=time.time()
print 'warnTimeout '+str(WarnTimeout)
print 'critTimeout '+str(CritTimeout)
print 'start',str(start)
while wait:
passed = time.time()-start
print 'passed
Hi There,
I got following code:
start=time.time()
print 'warnTimeout '+str(WarnTimeout)
print 'critTimeout '+str(CritTimeout)
print 'start',str(start)
while wait:
passed = time.time()-start
print 'passed ',str(passed)
if passed = WarnTimeout:
print ' Warning!'
...
...
...
On Fri, May 14, 2010 at 5:14 PM, cerr ron.egg...@gmail.com wrote:
Hi There,
I got following code:
start=time.time()
print 'warnTimeout '+str(WarnTimeout)
print 'critTimeout '+str(CritTimeout)
print 'start',str(start)
while wait:
passed = time.time()-start
print 'passed
On May 14, 7:14 pm, cerr ron.egg...@gmail.com wrote:
Hi There,
I got following code:
start=time.time()
print 'warnTimeout '+str(WarnTimeout)
print 'critTimeout '+str(CritTimeout)
print 'start',str(start)
while wait:
passed = time.time()-start
print 'passed ',str(passed)
if
cerr wrote:
Hi There,
I got following code:
start=time.time()
print 'warnTimeout '+str(WarnTimeout)
print 'critTimeout '+str(CritTimeout)
print 'start',str(start)
while wait:
passed = time.time()-start
print 'passed ',str(passed)
if passed = WarnTimeout:
print ' Warning!'
a MySQLdb problem and a pretty weird one
at that. Suggestions?
Thanks
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Could you post a minimal version of the DB (a DB dump) to test it?
Just remove most information and leave on the ones needed to reproduce
the error. Also remove any personal/confidential information. Then
dump the DB so I can test it here.
Best,
SB.
--
Anthra Norell wrote:
Hi all,
Can anyone explain this? Three commands with three different cutoff
dates (12/30, 12/31 and 1/1) produce a formatting inconsistency. Examine
the third field. The first and last run represents it correctly. The
second run strips it. The field happens to be a
Anthra Norell wrote:
Sebastian Bassi wrote:
Hi,
Could you post a minimal version of the DB (a DB dump) to test it?
Just remove most information and leave on the ones needed to reproduce
the error. Also remove any personal/confidential information. Then
dump the DB so I can test it here.
Best,
))
return '%s at %#x' % (' '.join(status), id(self))
Which doesn't seem excessively complex...
--
components: Library (Lib)
messages: 103816
nosy: djc
severity: normal
status: open
title: asyncore.dispatcher.__repr__() is weird
versions: Python 2.6
Changes by Dirkjan Ochtman dirk...@ochtman.nl:
--
nosy: +josiah.carlson, josiahcarlson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8483
___
___
Dirkjan Ochtman dirk...@ochtman.nl added the comment:
Current guess for this behavior: dispatcher doesn't have __str__, so
__getattr__ escalates to _socket.socket.__str__, which gets redirected to
_socket.socket.__repr__.
--
___
Python tracker
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8483
___
___
R. David Murray rdmur...@bitdance.com added the comment:
I'm not clear on what you are finding weird, here. Your issue title talks
about __repr__, but your last post talks about __str__.
--
nosy: +r.david.murray
priority: - low
___
Python tracker
Dirkjan Ochtman dirk...@ochtman.nl added the comment:
David, just have a look at the interpreter transcript, in particular the
results of the print statements. I'm not sure why it happens, in my previous
message I just stated a hypothesis.
--
___
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I think the problem relies in here:
# cheap inheritance, used to pass all other attribute
# references to the underlying socket object.
def __getattr__(self, attr):
return getattr(self.socket, attr)
I wonder why this
R. David Murray rdmur...@bitdance.com added the comment:
I somehow missed the fact that B was a dispatcher subclass. Too early in my
morning, I guess.
So, I think the title of this issue should be asyncore.dispatcher's __repr__
not being used as fallback for __str__, and your speculation
a code which is fundamentally *already* wrong.
Maybe we can do this in 2.7 and 3.2 only?
The AttributeError message is *very* confusing.
Actually I've seen it a lot of times through the years and never figured out it
had to do with that weird __getattr__ statement
[ python3.1.1, re.__version__='2.2.1' ]
I'm trying to use re to split a string into (any number of) pieces of
these kinds:
1) contiguous runs of letters
2) contiguous runs of digits
3) single other characters
e.g. 555tHe-rain.in#=1234 should give: [555, 'tHe', '-', 'rain',
'.', 'in', '#',
gry wrote:
[ python3.1.1, re.__version__='2.2.1' ]
I'm trying to use re to split a string into (any number of) pieces of
these kinds:
1) contiguous runs of letters
2) contiguous runs of digits
3) single other characters
e.g. 555tHe-rain.in#=1234 should give: [555, 'tHe', '-', 'rain',
'.',
On 8 Apr, 19:49, gry georgeryo...@gmail.com wrote:
[ python3.1.1, re.__version__='2.2.1' ]
I'm trying to use re to split a string into (any number of) pieces of
these kinds:
1) contiguous runs of letters
2) contiguous runs of digits
3) single other characters
e.g. 555tHe-rain.in#=1234
On Apr 8, 1:49 pm, gry georgeryo...@gmail.com wrote:
[ python3.1.1, re.__version__='2.2.1' ]
I'm trying to use re to split a string into (any number of) pieces of
these kinds:
1) contiguous runs of letters
2) contiguous runs of digits
3) single other characters
e.g. 555tHe-rain.in#=1234
it thinks its finding but nested capture-groups
always produce somewhat weird results for me (I suspect that's what's
triggering the duplication). Additionally, you're only searching for
one match (.match() returns a single match-object or None; not all
possible matches within the repeated
On Apr 8, 3:40 pm, MRAB pyt...@mrabarnett.plus.com wrote:
...
Group 1 and group 4 match '='.
Group 1 and group 3 match '1234'.
If a group matches then any earlier match of that group is discarded,
Wow, that makes this much clearer! I wonder if this behaviour
shouldn't be mentioned in some
On 8 Apr, 19:49, gry georgeryo...@gmail.com wrote:
[ python3.1.1, re.__version__='2.2.1' ]
I'm trying to use re to split a string into (any number of) pieces of
these kinds:
1) contiguous runs of letters
2) contiguous runs of digits
3) single other characters
e.g. 555tHe-rain.in#=1234
s='555tHe-rain.in#=1234'
import re
r=re.compile(r'([a-zA-Z]+|\d+|.)')
r.findall(s)
['555', 'tHe', '-', 'rain', '.', 'in', '#', '=', '1234']
This is nice and simple and has the invertible property that Patrick
mentioned above. Thanks much!
--
On Apr 8, 3:40 pm, gry georgeryo...@gmail.com wrote:
s='555tHe-rain.in#=1234'
import re
r=re.compile(r'([a-zA-Z]+|\d+|.)')
r.findall(s)
['555', 'tHe', '-', 'rain', '.', 'in', '#', '=', '1234']
This is nice and simple and has the invertible property that Patrick
SPARSE COMPLETE SETS FOR NP:
SOLUTION OF A CONJECTURE
BY MARTIN MICHAEL MUSATOV *
for llP:
Sparse Comp1ete Sets
Solution of a Conjecture
In this paper we show if NP has a sparse complete
set under many-one reductions, then ? NP.
The result is extended to show NP is sparse reducible, then P =
On Fri, Apr 2, 2010 at 8:14 PM, A Serious Moment marty.musa...@gmail.comwrote:
SPARSE COMPLETE SETS FOR NP:
SOLUTION OF A CONJECTURE
BY MARTIN MICHAEL MUSATOV *
for llP:
Sparse Comp1ete Sets
Solution of a Conjecture
Hi,
If you're serious about this posting, could you please:
1)
Florent Xicluna florent.xicl...@gmail.com added the comment:
Fixed in trunk.
--
dependencies: -Update ElementTree with upstream changes
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
superseder: - Update ElementTree with upstream changes
On Thursday 24 September 2009 02:01:52 pm Christian Heimes wrote:
Sampsa Riikonen wrote:
= If I start the program in directory paska2, everythings OK, but if
the directory name happens to be python, the importation of the modules
goes nuts!
What's inside the python/ subdirectory? Do you
):
AttributeError: 'module' object has no attribute 'pack'
---
= If I start the program in directory paska2, everythings OK, but if the
directory name happens to be python, the importation of the modules goes
nuts!
Very Weird.
Kind Regards,
Sampsa
--
Niin tärkeä ihmisoikeus kuin
Sampsa Riikonen wrote:
= If I start the program in directory paska2, everythings OK, but if the
directory name happens to be python, the importation of the modules goes
nuts!
What's inside the python/ subdirectory? Do you happen to have a file
called struct.py inside it?
--
daved170 wrote:
On Sep 15, 6:29 pm, Peter Otten __pete...@web.de wrote:
daved170 wrote:
Hi everybody,
I'm using SPE 0.8.3.c as my python editor.
I'm using thestr() function and i got a very odd error.
I'm trying to do this: printstr(HI)
When i'm writing this line in the shell it
On Sep 15, 6:29 pm, Peter Otten __pete...@web.de wrote:
daved170 wrote:
Hi everybody,
I'm using SPE 0.8.3.c as my python editor.
I'm using thestr() function and i got a very odd error.
I'm trying to do this: printstr(HI)
When i'm writing this line in the shell it prints: HI
When it's
, 1684234849) # same again
--
components: Library (Lib)
messages: 92724
nosy: Manux
severity: normal
status: open
title: struct.unpack weird behavior with bi (byte then integer)
type: behavior
versions: Python 2.6
___
Python tracker rep...@bugs.python.org
Mark Dickinson dicki...@gmail.com added the comment:
I think this is expected behaviour: the key point is that structs can
include padding bytes. From the documentation:
By default, C numbers are represented in the machine’s native format and
byte order, and properly aligned by skipping pad
On Sep 15, 1:32 am, MRAB pyt...@mrabarnett.plus.com wrote:
Bakes wrote:
On Sep 13, 11:47 pm, MRAB pyt...@mrabarnett.plus.com wrote:
Bakes wrote:
On 13 Sep, 22:41, Chris Rebert c...@rebertia.com wrote:
On Sun, Sep 13, 2009 at 2:34 PM, Bakes ba...@ymail.com wrote:
I am using a simple
daved170 wrote:
Hi everybody,
I'm using SPE 0.8.3.c as my python editor.
I'm using the str() function and i got a very odd error.
I'm trying to do this: print str(HI)
When i'm writing this line in the shell it prints: HI
When it's in my code (it's the only line) i'm getting the following
daved170 wrote:
Hi everybody,
I'm using SPE 0.8.3.c as my python editor.
I'm using the str() function and i got a very odd error.
I'm trying to do this: print str(HI)
When i'm writing this line in the shell it prints: HI
When it's in my code (it's the only line) i'm getting the following
error:
On Sep 13, 11:47 pm, MRAB pyt...@mrabarnett.plus.com wrote:
Bakes wrote:
On 13 Sep, 22:41, Chris Rebert c...@rebertia.com wrote:
On Sun, Sep 13, 2009 at 2:34 PM, Bakes ba...@ymail.com wrote:
I am using a simple python script to download my logfiles. This is on
a while loop, the logfile
Bakes wrote:
On Sep 13, 11:47 pm, MRAB pyt...@mrabarnett.plus.com wrote:
Bakes wrote:
On 13 Sep, 22:41, Chris Rebert c...@rebertia.com wrote:
On Sun, Sep 13, 2009 at 2:34 PM, Bakes ba...@ymail.com wrote:
I am using a simple python script to download my logfiles. This is on
a while loop, the
I am using a simple python script to download my logfiles. This is on
a while loop, the logfile grows rapidly, so it is necessary for python
to start downloading the new script as soon as it has finished the
old.
It works fine (for about 20 minutes), then crashes. I have removed a
couple of
On Sun, Sep 13, 2009 at 2:34 PM, Bakes ba...@ymail.com wrote:
I am using a simple python script to download my logfiles. This is on
a while loop, the logfile grows rapidly, so it is necessary for python
to start downloading the new script as soon as it has finished the
old.
It works fine
On 13 Sep, 22:41, Chris Rebert c...@rebertia.com wrote:
On Sun, Sep 13, 2009 at 2:34 PM, Bakes ba...@ymail.com wrote:
I am using a simple python script to download my logfiles. This is on
a while loop, the logfile grows rapidly, so it is necessary for python
to start downloading the new
Bakes wrote:
On 13 Sep, 22:41, Chris Rebert c...@rebertia.com wrote:
On Sun, Sep 13, 2009 at 2:34 PM, Bakes ba...@ymail.com wrote:
I am using a simple python script to download my logfiles. This is on
a while loop, the logfile grows rapidly, so it is necessary for python
to start downloading
I've stumbled upon the following in Python 3:
Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
import sys
sys.stdout.write()
0
sys.stdout.write(something)
something9
write() is appending the length of the
Jerzy Jalocha N wrote:
I've stumbled upon the following in Python 3:
Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
import sys
sys.stdout.write()
0
sys.stdout.write(something)
something9
write()
On Aug 24, 10:13 am, Jerzy Jalocha N jjalo...@gmail.com wrote:
I've stumbled upon the following in Python 3:
Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
import sys
sys.stdout.write()
0
import sys
n = sys.stdout.write('something')
something n
9
Yes, that works as expected, now, similar to 2.6.
Thank you both, Diez and André!
-Jerzy
--
http://mail.python.org/mailman/listinfo/python-list
Jerzy Jalocha N wrote:
I've stumbled upon the following in Python 3:
Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
import sys
sys.stdout.write()
0
sys.stdout.write(something)
On Mon, Aug 24, 2009 at 10:52 AM, Dave Angelda...@ieee.org wrote:
The write() function changed in 3.0, but not in the way you're describing.
It now (usually) has a return value, the count of the number of characters
written.
[...]
But because you're running from the interpreter, you're seeing
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
priority: - normal
stage: - patch review
versions: +Python 2.7 -Python 2.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3151
___
In article gt0d15$167...@adenine.netfront.net,
namekuseijin namekuseijin.nos...@gmail.com wrote:
I don't like *for* at all. It both makes it tough to get true closures
and also unnecessarily pollutes the namespace with non-local variables.
Maybe. Consider this standard Python idiom:
for x
The real issue here has nothing to do with closures, lexical capture or
anything like that. It's a long known issue called side-effects.
Trying to program in a functional style in the presence of side-effects
is bad. *for* is the main perpetrator of side-effects here, because it
updates its
Hi all,
I want to generate some methods in a class using setattr and lambda.
Within each generated function a name parameter to the function is
replaced by a string constant, to keep trail which function was called.
The problem I have is, that the substituted name parameter is not
replaced by the
On Wed, Apr 22, 2009 at 4:50 AM, Rüdiger Ranft _r...@web.de wrote:
Hi all,
I want to generate some methods in a class using setattr and lambda.
Within each generated function a name parameter to the function is
replaced by a string constant, to keep trail which function was called.
The
601 - 700 of 1043 matches
Mail list logo