On Fri, Oct 11, 2013 at 11:13 AM, Dennis Lee Bieber
wlfr...@ix.netcom.com wrote:
On Fri, 11 Oct 2013 01:20:01 +1100, Chris Angelico ros...@gmail.com
declaimed the following:
This belongs in the Izzet League, I think.
Was that an MtG reference?
It most assuredly was. The Ravnican
Could someone give me a brief thumbnail sketch of the difference between
multi-threaded programming in Java.
I have a fairly sophisticated algorithm that I developed as both a single
threaded and multi-threaded Java application. The multi-threading port was
fairly simple, partly because Java
On Fri, Oct 11, 2013 at 2:00 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
I'll now go and write I will always test my code snippets before
posting on the blackboard one hundred times.
print(I will always test my code snippets before posting\n*100)
ChrisA
PS. Irony would be
Eric Frederich eric.freder...@gmail.com writes:
I'm extending an application that supports customization using the C
language.
I am able to write standalone python applications that use the C API's
using cffi.
This is good, but only a first step.
This application allows me to register code
On 10/11/2013 04:33 AM, Ian Kelly wrote:
On Thu, Oct 10, 2013 at 8:11 PM, Steven D'Aprano
One of the side-effects of this being a hack is that this doesn't work:
class X(Y):
def method(self, arg):
f = super
f().method(arg)
Actually, that works just fine. The
On 10/11/2013 04:11 AM, Steven D'Aprano wrote:
super() with no arguments is*completely* a hack[1], and one where GvR
has said Never again! if I remember correctly. I don't think he regrets
allowing the super compile-time magic, just that it really is magic and
he doesn't want to make a habit
This is the code I m trying to run:
from sympy import *
import numpy as np
from sympy import symbols
def deriv(x,t):
a = array(x)
for i in range(0,len(x)):
temp = x[i]
a[i] = temp[0].diff(t)
return a
def matrixmult (A, B):
C = [[0 for row in range(len(A))] for
On 11Oct2013 05:51, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info
wrote:
On Fri, 11 Oct 2013 15:36:29 +1100, Cameron Simpson wrote:
But is it reliable? Will it work on any decorated function?
*Any* decorated function? No, of course not, since decorators can do
anything they like:
On 10Oct2013 23:01, Peter Cacioppi peter.cacio...@gmail.com wrote:
Could someone give me a brief thumbnail sketch of the difference between
multi-threaded programming in Java.
I have a fairly sophisticated algorithm that I developed as both a single
threaded and multi-threaded Java
On 10/11/2013 08:28 AM, Surbhi Gupta wrote:
This is the code I m trying to run:
from sympy import *
import numpy as np
from sympy import symbols
def deriv(x,t):
a = array(x)
for i in range(0,len(x)):
temp = x[i]
a[i] = temp[0].diff(t)
return a
def matrixmult
Roy Smith writes:
In article m2a9ihxf3a@cochabamba.vanoostrum.org,
Piet van Oostrum wrote:
I usually say that a closure is a package, containing a function
with some additional data it needs. The data usually is in the
form of name bindings.
That's pretty close to the way I think
I am using IDLE, Python 2.7.2 on Windows 7, 64-bit.
I have four questions:
1. Why is it that
print unicode_object
displays non-ASCII characters in the unicode object correctly, whereas
print (unicode_object, another_unicode_object)
displays non-ASCII characters in the unicode objects
On 11 October 2013 03:08, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Your mistake here seems to be that you're assuming that if two numbers
are equal, they must be in the same domain, but that's not the case.
(Perhaps you think that 0.0 == 0+0j should return False?) It's
On 10/10/2013 11:13 PM, Cameron Simpson wrote:
On 11Oct2013 02:55, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info
wrote:
def undecorate(f):
Return the undecorated inner function from function f.
return f.func_closure[0].cell_contents
Whereas this feels like black magic. Is
On 10/11/2013 12:36 AM, Steven D'Aprano wrote:
I also like Terry Reedy's suggestion of having the decorator
automatically add the unwrapped function to the wrapped function as an
attribute:
def decorate(func):
@functools.wraps(func)
def inner(arg):
blah blah
On 10/11/2013 4:17 AM, Terry Reedy wrote:
On 10/10/2013 11:13 PM, Cameron Simpson wrote:
On 11Oct2013 02:55, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
def undecorate(f):
Return the undecorated inner function from function f.
return f.func_closure[0].cell_contents
Stephen Tucker stephen_tuc...@sil.org writes:
I am using IDLE, Python 2.7.2 on Windows 7, 64-bit.
Python 2 is not as good at Unicode as Python 3. In fact, one of the
major reasons to switch to Python 3 is that it fixes Unicode behaviour
that was worse in Python 2.
I have four questions:
1.
On 10/11/2013 4:17 AM, Terry Reedy wrote:
On 10/10/2013 11:13 PM, Cameron Simpson wrote:
On 11Oct2013 02:55, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
def undecorate(f):
Return the undecorated inner function from function f.
return f.func_closure[0].cell_contents
On Thursday, October 10, 2013 11:01:25 PM UTC-7, Peter Cacioppi wrote:
Could someone give me a brief thumbnail sketch of the difference between
multi-threaded programming in Java.
I have a fairly sophisticated algorithm that I developed as both a single
threaded and multi-threaded Java
On Fri, Oct 11, 2013 at 7:41 PM, Peter Cacioppi
peter.cacio...@gmail.com wrote:
So, my hope is that the GIL restrictions won't be problematic here. That is
to say, I don't need **Python** code to ever run concurrently. I just need
Python to allow a different Python worker thread to execute
Stephen Tucker wrote:
I am using IDLE, Python 2.7.2 on Windows 7, 64-bit.
I have four questions:
1. Why is it that
print unicode_object
displays non-ASCII characters in the unicode object correctly, whereas
print (unicode_object, another_unicode_object)
displays non-ASCII
On Fri, 11 Oct 2013 09:17:37 +0100, Joshua Landau wrote:
On 11 October 2013 03:08, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Your mistake here seems to be that you're assuming that if two numbers
are equal, they must be in the same domain, but that's not the case.
(Perhaps
On 10/11/13 4:16 AM, Stephen Tucker wrote:
I am using IDLE, Python 2.7.2 on Windows 7, 64-bit.
I have four questions:
1. Why is it that
print unicode_object
displays non-ASCII characters in the unicode object correctly, whereas
print (unicode_object, another_unicode_object)
displays
On Fri, 11 Oct 2013 10:14:29 +0300, Jussi Piitulainen wrote:
Roy Smith writes:
In article m2a9ihxf3a@cochabamba.vanoostrum.org,
Piet van Oostrum wrote:
I usually say that a closure is a package, containing a function with
some additional data it needs. The data usually is in the
On Fri, 11 Oct 2013 17:53:02 +1100, Cameron Simpson wrote:
Other Python implementations may be more aggressive. I'd suppose Jypthon
could multithread like Java, but really I have no experience with them.
Neither Jython nor IronPython have a GIL.
The standard answer with CPython is that if
On 11 October 2013 12:27, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote:
On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith r...@panix.com wrote:
BTW, one of the earliest things that turned me on to Python was when I
discovered
Cameron, Steven, Ben, Ned, Terry, Roy. Many thanks for this interesting
discussion.
I ended up... mixing some solutions provided by your hints :
* Adding an __original__ attribute to the wrapper func in the decorators of
my own
* Playing with func_closure to test functions/methods provided by
On Fri, Oct 11, 2013 at 8:11 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
If you implicitly decide to promote entities, then of course you can
promote y to a real then take the invoice.
Either you're channelling Bugs Bunny or you're trying to sell me
something... you mean
On Thu, 10 Oct 2013 14:12:36 +, Grant Edwards wrote:
Nope. i is electical current (though it's more customary to use upper
case).
I is steady-state current (either AC or DC), i is small-signal
current.
--
https://mail.python.org/mailman/listinfo/python-list
On 11 October 2013 10:35, David bouncingc...@gmail.com wrote:
On 11 October 2013 12:27, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote:
On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith r...@panix.com wrote:
BTW, one of the
Steven D'Aprano writes:
On Fri, 11 Oct 2013 10:14:29 +0300, Jussi Piitulainen wrote:
Roy Smith writes:
In article m2a9ihxf3a@cochabamba.vanoostrum.org,
Piet van Oostrum wrote:
I usually say that a closure is a package, containing a
function with some additional data it needs.
In article 5257c3dd$0$29984$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
On Fri, 11 Oct 2013 10:14:29 +0300, Jussi Piitulainen wrote:
Roy Smith writes:
In article m2a9ihxf3a@cochabamba.vanoostrum.org,
Piet van Oostrum wrote:
Oscar Benjamin writes:
tried to explain why their field couldn't use π for the
circumference of a unit circle I would suggest that they adjust the
other parts of their notation not π (there are other uses of π.
There's τ for the full circle; π is used for half the circumference.
duck/
--
On 2013-10-11, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
On Thu, 10 Oct 2013 17:48:16 +, Neil Cerutti wrote:
5.0 == abs(3 + 4j)
False
Did you maybe accidentally rebind abs? If not, what version of
Python are you using?
Honestly, I think I got my Python term and my
I know I have things bassackwards, but trying to process Gtk events
from Tkinter's main loop using after() isn't working. (I suspect our
underlying C++ (ab)use of Gtk may require a Gtk main loop). I'd like
to process Tk events periodically from a GObject main loop. I know I
want to call
In article 5223ac4a-783e-405d-84a4-239070b66...@googlegroups.com,
John Ladasky john_lada...@sbcglobal.net wrote:
On Thursday, October 10, 2013 5:07:11 PM UTC-7, Roy Smith wrote:
I'd like an argument, please.
'Receptionist' (Rita Davies) - Yes, sir?
'Man' (Michael Palin) - I'd like to have
Hi,
I've just released Kaa 0.0.4 to PyPI.
https://pypi.python.org/pypi/kaaedit/
Kaa is a easy yet powerful text editor for console user interface,
providing numerous features like
- Macro recording.
- Undo/Redo.
- Multiple windows/frames.
- Syntax highlighting.
- Open source software(MIT)
A quick reply to all you contributors (by the way, I was not expecting to
get so many responses so quickly - I am (as you probably realise) new to
this kind of thing.
I am stuck with Python 2.X because ESRI's ArcGIS system uses it -
otherwise, yes, you're all right, I would be in Python 3.X like
In article mailman.1001.1381491074.18130.python-l...@python.org,
Oscar Benjamin oscar.j.benja...@gmail.com wrote:
If someone tried to explain why their field couldn't use ð for the
circumference of a unit circle I would suggest that they adjust the
other parts of their notation not ð (there
hi,
im looking for a way to calculate download speed for a http connection
inside my .pcap file.
but doing even a simple read with dpkt doesnt really work.
import pcap, dpkt
import socket
pcapReader = dpkt.pcap.Reader(file(http-download.pcap))
for ts, data in pcapReader:
print ts,
Chris Angelico ros...@gmail.com writes:
On Fri, Oct 11, 2013 at 7:41 PM, Peter Cacioppi
peter.cacio...@gmail.com wrote:
So, my hope is that the GIL restrictions won't be problematic here. That is
to say, I don't need **Python** code to ever run concurrently. I just need
Python to allow a
Hi guys.
I have a CSV file, which I created using an HTML export from a Check Point
firewall policy.
Each rule is represented as several lines, in some cases. That occurs when a
rule has several address sources, destinations or services.
I need the output to have each rule described in only one
Hi guys.
I have a CSV file, which I created using an HTML export from a Check Point
firewall policy.
Each rule is represented as several lines, in some cases. That occurs when a
rule has several address sources, destinations or services.
I need the output to have each rule described in only one
On Fri, Oct 11, 2013 at 11:01 AM, Starriol juansc...@gmail.com wrote:
Hi guys.
I have a CSV file, which I created using an HTML export from a Check Point
firewall policy.
Each rule is represented as several lines, in some cases. That occurs when a
rule has several address sources,
I'm running into a problem in the multiprocessing module.
My code is running four parallel processes which are doing network access
completely independently of each other (gathering data from different remote
sources). On rare circumstances, the code blows up when one of my processes
has do
Hello guys, i want to make a simple sript that can automatically generate
normal to adf.ly links using my accounts? it is possible for me to do this
using python and use it as python command line. if it's possible what library
do i need to use? any help will be appreciated.
--
On Fri, 11 Oct 2013 15:01:40 +0300, Jussi Piitulainen wrote:
Steven D'Aprano writes:
Closures have nothing to do with *arguments*. A better definition of a
closure is that it is a function together with a snapshot of the
environment it was called from.
[...]
Second, it's precisely not (a
On 11 October 2013 10:11, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Fri, 11 Oct 2013 09:17:37 +0100, Joshua Landau wrote:
On 11 October 2013 03:08, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Given:
x ∈ ℝ, x = 2 (reals)
y ∈ ℕ, y = 2 (natural numbers)
On Fri, 11 Oct 2013 09:14:08 -0700, Datin Farah Natasha wrote:
Hello guys, i want to make a simple sript that can automatically
generate normal to adf.ly links using my accounts? it is possible for me
to do this using python and use it as python command line. if it's
possible what library do
On Fri, 11 Oct 2013 10:05:03 -0400, Roy Smith wrote:
In article mailman.1001.1381491074.18130.python-l...@python.org,
Oscar Benjamin oscar.j.benja...@gmail.com wrote:
If someone tried to explain why their field couldn't use ð for the
circumference of a unit circle I would suggest that they
On Fri, 11 Oct 2013 09:16:36 +0100, Stephen Tucker wrote:
I am using IDLE, Python 2.7.2 on Windows 7, 64-bit.
I have four questions:
1. Why is it that
print unicode_object
displays non-ASCII characters in the unicode object correctly, whereas
print (unicode_object,
On 9 October 2013 16:15, Skip Montanaro s...@pobox.com wrote:
Datetime objects have a replace method, but timedelta objects don't.
If I take the diff of two datetimes and want to zero out the
microseconds field, is there some way to do it more cleanly than this?
delta = dt1 - dt2
zero_delta
On Friday 11 October 2013 12:49:40 Roy Smith did opine:
In article mailman.1001.1381491074.18130.python-l...@python.org,
Oscar Benjamin oscar.j.benja...@gmail.com wrote:
If someone tried to explain why their field couldn't use ً for the
circumference of a unit circle I would suggest that
On 10/10/2013 08:01 PM, Roy Smith wrote:
On 10Oct2013 19:44, Ned Batchelder n...@nedbatchelder.com wrote:
I have to admit I'm having a hard time understanding why you'd need
to test the undecorated functions. After all, the undecorated
functions aren't available to anyone. All that matters is
Stephen Tucker stephen_tuc...@sil.org writes:
ESRI compound the problem, actually, by making all the strings that the
ArcGIS Python interface
delivers (from MS SQLServer) Unicode! (I suppose, on reflection, they have no
choice.) So I am
stuck with the worst of both worlds - a generation of
On 10/10/2013 08:13 PM, Cameron Simpson wrote:
On 11Oct2013 02:55, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info
wrote:
On Fri, 11 Oct 2013 09:12:38 +1100, Cameron Simpson wrote:
Speaking for myself, I would be include to recast this code:
@absolutize
def addition(a, b):
On 10/10/13 10:22 PM, Cameron Simpson wrote:
On 10Oct2013 19:44, Ned Batchelder n...@nedbatchelder.com wrote:
On 10/10/13 6:12 PM, Cameron Simpson wrote:
Speaking for myself, I would be include to recast this code:
@absolutize
def addition(a, b):
return a + b
into:
def
On Saturday, October 12, 2013 1:02:30 AM UTC+8, Steven D'Aprano wrote:
On Fri, 11 Oct 2013 09:14:08 -0700, Datin Farah Natasha wrote:
Hello guys, i want to make a simple sript that can automatically
generate normal to adf.ly links using my accounts? it is possible for me
to do
On 10/11/2013 4:41 AM, Peter Cacioppi wrote:
I should add that the computational heavy lifting is done in a third party
library. So a worker thread looks roughly like this (there is a subtle race
condition I'm glossing over).
while len(jobs) :
job = jobs.pop()
model = Model(job)
Am 11.10.13 14:52, schrieb Skip Montanaro:
I know I have things bassackwards, but trying to process Gtk events
from Tkinter's main loop using after() isn't working. (I suspect our
underlying C++ (ab)use of Gtk may require a Gtk main loop). I'd like
to process Tk events periodically from a
On 10/11/2013 9:31 AM, Stephen Tucker wrote:
to be able to by itself. The distinction between the geekiness of a
tuple compared with the non-geekiness of a string is, itself, far too
geeky for my liking. The distinction seems to be an utterly spurious -
even artificial or arbitrary one to me.
On Thursday, October 10, 2013 11:01:25 PM UTC-7, Peter Cacioppi wrote:
Could someone give me a brief thumbnail sketch of the difference between
multi-threaded programming in Java.
I have a fairly sophisticated algorithm that I developed as both a single
threaded and multi-threaded Java
On 2013-10-11 08:01, Starriol wrote:
NO.;NAME;SOURCE;DESTINATION;VPNnbsp;nbsp;;SERVICE;ACTION;TRACK;INSTALL
ON;TIME;COMMENT
1;;fwxcluster;mcast_vrrp;;vrrp;accept;Log;fwxcluster;Any;VRRP;;*Comment
suppressed* ;igmp**;
On 2013-10-11 15:40, Tim Chase wrote:
the dangling open-quotes on #1 that cause most CSV parsers to read
until the subsequent line is read.
And by subsequent line, I mean subsequent closing-quote of
course. :-)
-tkc
--
https://mail.python.org/mailman/listinfo/python-list
On 10/11/2013 12:44 PM, Steven D'Aprano wrote:
On Fri, 11 Oct 2013 15:01:40 +0300, Jussi Piitulainen wrote:
Steven D'Aprano writes:
Closures have nothing to do with *arguments*. A better definition of a
closure is that it is a function together with a snapshot of the
environment it was called
On 10/11/2013 8:08 AM, Franck Ditter wrote:
In article 5257c3dd$0$29984$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
On Fri, 11 Oct 2013 10:14:29 +0300, Jussi Piitulainen wrote:
Roy Smith writes:
In article
On Friday, October 11, 2013 5:50:06 PM UTC-3, Tim Chase wrote:
On 2013-10-11 15:40, Tim Chase wrote:
the dangling open-quotes on #1 that cause most CSV parsers to read
until the subsequent line is read.
And by subsequent line, I mean subsequent closing-quote of
course. :-)
On 11Oct2013 15:53, Terry Reedy tjre...@udel.edu wrote:
On 10/11/2013 4:41 AM, Peter Cacioppi wrote:
I should add that the computational heavy lifting is done in a third party
library. So a worker thread looks roughly like this (there is a subtle race
condition I'm glossing over).
while
On 11Oct2013 02:37, Gilles Lenfant gilles.lenf...@gmail.com wrote:
* Adding an __original__ attribute to the wrapper func in the decorators of
my own
Just one remark: Call this __original or _original (or even original).
The __x__ names are reserved for python operations (like __add__,
On 11/10/2013 07:09, Atsuo Ishimoto wrote:
Hi,
I've just released Kaa 0.0.4 to PyPI.
https://pypi.python.org/pypi/kaaedit/
Kaa is a easy yet powerful text editor for console user interface,
What's a console user interface? That's what Windows calls a DOS
box. But otherwise you seem
On 11/10/2013 22:22, Starriol wrote:
On Friday, October 11, 2013 5:50:06 PM UTC-3, Tim Chase wrote:
On 2013-10-11 15:40, Tim Chase wrote:
the dangling open-quotes on #1 that cause most CSV parsers to read
until the subsequent line is read.
And by subsequent line, I mean subsequent
On 10/11/2013 10:53 AM, William Ray Wing wrote:
I'm running into a problem in the multiprocessing module.
My code is running four parallel processes which are doing network access completely
independently of each other (gathering data from different remote sources). On rare
circumstances,
I have a 3rd-party process that runs for about a minute and supports
only a single execution at a time.
$ deploy
If I want to launch a second process I have to wait until the first
finishes. Having two users wanting to run at the same time might
happen a few times a day. But, these users will
As with most I'm sure, short of using abc's, I've had very little exposure
to metaclasses. So, when digging into abc implementation, I figured it
would be a good idea to dig into metaclasses, their usage and actually try
writing one.
What I did may be contrived, but it was fun nonetheless and a
I realize this is off-topic, but I'm not sure what forum is best for asking
about this. I figure that at least a few of you are involved in civic hacking
groups.
I recently joined a group that does civic hacking. (Adopt-A-Hydrant is an
example of civic hacking.)
We need a solution for
job openiongs @ CompSoft India
Job Title: Software Engineer
Qualification: Any Graduate
Experience: Fresher
Location: Chennai
for more details apply click here:
http://referenceglobe.com/Postings_Internal/view_job_details_encoded.php?postid=MTM5MQ==
--
Jason Friedman jsf80...@gmail.com writes:
I have a 3rd-party process that runs for about a minute and supports
only a single execution at a time.
$ deploy
If I want to launch a second process I have to wait until the first
finishes. Having two users wanting to run at the same time might
On 10/12/2013 04:47 AM, Demian Brecht wrote:
Working on this though brought up a question: Is there anything in the
data model that acts like __setattr__ but when operating on a class
definition instead of an instance? I'd be able to get rid of the
late_bind function if something like that's
Antoine Pitrou added the comment:
The patch needs a test, a proper doc, and reviewing.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18233
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3982
___
Arfrever Frehtes Taifersar Arahesis added the comment:
Is there any reason why the order of characters matters here?
builtins.open() supports them in any order (br==rb, bw==wb, ba==ab,
bx==xb).
--
nosy: +Arfrever
___
Python tracker
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19222
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19223
___
Arfrever Frehtes Taifersar Arahesis added the comment:
Also tarfile.open() could support x mode.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19201
___
Antoine Pitrou added the comment:
Sorry for the incorrect answer. I just noticed there was a test in the patch!
Further looking at it, I notice the new function is returning a tuple. Wouldn't
it be better to return a list here?
--
___
Python tracker
Dustin Oprea added the comment:
My two-cents is to leave it a tuple (why not?).
Dustin
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18233
___
Antoine Pitrou added the comment:
Is this something we actually want to support officially? Many other types have
non-repeatable hashes, e.g.:
$ PYTHONHASHSEED=1 python3 -c print(hash((lambda: 0)))
8771754605115
$ PYTHONHASHSEED=1 python3 -c print(hash((lambda: 0)))
8791504743739
$
Antoine Pitrou added the comment:
-1 on such hacks. I much prefer the _abcoll approach.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19218
___
STINNER Victor added the comment:
The collections module is loaded by the io module. You removed from
collections.abc import MutableMapping from os.py. To be useful, you have also
to rewrite the whole io module to remove all references to the collections.abc
module, right?
--
nosy:
Antoine Pitrou added the comment:
Why adding ASCII strings, whereas you can add Latin1 (UCS1, U+-U+00FF)
strings?
Reasons:
- most strings in pyc files are pure ASCII (it's like 99% in the stdlib)
- unmarshalling ASCII strings is faster: you can pass 127 to PyUnicode_New
without scanning
STINNER Victor added the comment:
In the same Python version, hash(None) always give me the same value. I cannot
reproduced your issue on Linux, I tested Python 2.7, 3.3 and 3.4.
$ python2.7 -c print(hash(None))
17171842026
$ python2.7 -c print(hash(None))
17171842026
$ python2.7 -c
STINNER Victor added the comment:
It's wired and make difficulty for distributed systems partitioning data
according hash of keys if the system wants the keys support None.
How you handle the randomization of hash(str)? (python2.7 -R, enabled by
default in Python 3.3).
--
STINNER Victor added the comment:
unmarshalling ASCII strings is faster: you can pass 127 to PyUnicode_New
without scanning for non-ASCII chars
Oh, I forgot this pain of the PEP 393. Don't tell me more, it's enough :-)
--
___
Python tracker
Kristján Valur Jónsson added the comment:
I imagine that the test for ASCII is cheaper. It corresponds to the new
compact internal unicode representation (one byte characters).
This looks fine. Can you quantify where the speedup comes from? Reading the
code, I see we now maintain a small
Antoine Pitrou added the comment:
This looks fine. Can you quantify where the speedup comes from?
From all changes, but mainly the ASCII special-casing and the new
buffering.
Reading the code, I see we now maintain a small internal buffer in
the file object, rather than using stack
Antoine Pitrou added the comment:
Reading the code, I see we now maintain a small internal buffer in
the file object, rather than using stack allocation at the call
sites. It is unclear to me how this saves memory, since the amount
of memory copying should be the same.
No, memory
New submission from hiroaki itoh:
http://docs.python.org/2.7/c-api/exceptions.html#standard-exceptions
Python2.7 (at least 2.7.5) has PyExc_BufferError, but the document does not
tell it.
--
assignee: docs@python
components: Documentation
messages: 199458
nosy: docs@python,
Kristján Valur Jónsson added the comment:
Right, in this case, memory copying is avoided.
Regarding the memoing of 0, empty tuple, etc:
Special opcode may still benefit because it takes only one byte. So, you save
four bytes for each such case. I think it might be worth investigating.
hiroaki itoh added the comment:
also:
* GeneratorExit
* StopIteration
* VMSError (#ifdef __VMS)
* UnboundLocalError
* IndentationError
* TabError
* UnicodeError
* UnicodeDecodeError
* UnicodeEncodeError
* UnicodeTranslateError
* Warning;
* UserWarning;
* DeprecationWarning;
*
Martin v. Löwis added the comment:
It's at https://mail.python.org/mailman/listinfo/python-list
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19210
___
1 - 100 of 192 matches
Mail list logo