Pygments 2.0.2 released

2015-01-20 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm happy to announce the release of Pygments 2.0.2. Pygments is a generic syntax highlighter written in Python. The 2.0.2 release contains a fix for a prominent bug that would duplicate tracebacks in the Python console lexer that's used, among

[issue1508475] transparent gzip compression in urllib

2015-01-20 Thread Martin Panter
Martin Panter added the comment: The Lib/xmlrpc/client.py file appears to already support compression using “Content-Encoding: gzip”. Perhaps it could be leveraged for any work on this issue. -- ___ Python tracker rep...@bugs.python.org

[issue23269] Tighten-up search loops in sets

2015-01-20 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23269 ___

[issue23281] Access violation - pyc file

2015-01-20 Thread eryksun
eryksun added the comment: You attached a corrupt bytecode cache for stdlib bisect.py: f = open('test.pyc', 'rb') magic,tstamp = struct.unpack('ll', f.read(8)) magic27 = 62211 | (ord('\r') 16) | (ord('\n') 24) magic == magic27 True datetime.fromtimestamp(tstamp)

[issue18898] Apply the setobject optimizations to dictionaries

2015-01-20 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18898 ___

Re: Trees

2015-01-20 Thread Nicholas Cole
On Mon, Jan 19, 2015 at 11:52 PM, Devin Jeanpierre jeanpierr...@gmail.com wrote: On Mon, Jan 19, 2015 at 3:08 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Possibly because they aren't needed?

[issue23275] Can assign [] = (), but not () = []

2015-01-20 Thread Kyle Buzsaki
Kyle Buzsaki added the comment: It seems that assigning to [] is the odd one out in this case. Why is this even possible? [] = () [] = {} [] = set() list() = () File stdin, line 1 SyntaxError: can't assign to function call () = [] File stdin, line 1 SyntaxError: can't assign to () {}

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-20 Thread Ent
Ent added the comment: Following is updated patch with * Refactored code with helper functions * Unit Tests * Documentation - Explanation + Examples SimpleHTTPRequestHandler's copyfile has been renamed to copy_file but not shutils'. -- Added file:

[issue23275] Can assign [] = (), but not () = []

2015-01-20 Thread Martin Panter
Martin Panter added the comment: But () is the odd one out if you consider [a, b] = range(2) [] = range(0) (a, b) = range(2) () = range(0) File stdin, line 1 SyntaxError: can't assign to () -- nosy: +vadmium ___ Python tracker

[issue23276] hackcheck is broken in association with __setattr__

2015-01-20 Thread Alfred Krohmer
Alfred Krohmer added the comment: Can you elaborate what QtClass and QtMeta is in your case? My original example was reduced to a minimal case and seems to work with your suggestions. The complete example involving SQLalchemy is here:

pyzeliard - zeliard clone GPLv2

2015-01-20 Thread Automn
Hello, The old Sierra-On-Line game zeliard has been ported to python-pygame. The features for now are : fighting, cavern code, jumping, moving around and room exits. There is also some weapon store, bank and fortune teller work. You start in Bosque Town and can go to the Cavern of Malicia. I

[issue23276] hackcheck is broken in association with __setattr__

2015-01-20 Thread eryksun
eryksun added the comment: def __setattr__(cls, key, value): super(type(QMediaPlaylist), cls).__setattr__(cls, key, value) return The program segfaults when instantiating the Playlist class. I'd expect a TypeError because of the extra cls argument. It's already a bound

[issue1602] windows console doesn't print or input Unicode

2015-01-20 Thread Mark Hammond
Mark Hammond added the comment: File redirection has nothing to do with win-unicode-console Thank you, that comment is spot on - there are multiple issues being conflated here. This bug is purely about the tty/console behaviour. -- ___ Python

[issue23282] Slightly faster set lookup

2015-01-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently set_lookkey() first tests entry-key == NULL, then entry-hash == hash and entry-key != dummy, and only after that entry-key == key. Proposed patch optimizes the order of comparisons. entry-key == key is tested first as for dicts. And no need to

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: Yup, that's it. So two problems down: It has yet to be updated to the most recent Python version It features a now redundant replacement for yield from which should be removed I'm working on: It also loses support for calling function with keyword arguments

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Berker Peksag
Berker Peksag added the comment: Python/ast.c:2433:5: error: ‘npositionals’ undeclared (first use in this function) Line 2425 should be int i, nargs, nkeywords, npositionals, ngens; -- ___ Python tracker rep...@bugs.python.org

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. fdr...@gmail.com: -- nosy: -fdrake ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: Hi Chris. It might be hard to notice, but you're seeing the same build failure. Looking at the patch-to-patch differences, I didn't see anything out of the ordinary. My patch file includes more surrounding lines, dates, and is against a different repository,

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Changes by Neil Girdhar mistersh...@gmail.com: Added file: http://bugs.python.org/file37788/starunpack4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Changes by Neil Girdhar mistersh...@gmail.com: Removed file: http://bugs.python.org/file37787/starunpack4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Chris Angelico
Chris Angelico added the comment: *facepalm* Of course I am. I don't know how I missed that in there, but maybe I was focusing too much on the abort that followed it to actually read the exception text. Duh. But with the latest version of the patch, I'm seeing something that I'm fairly sure

Re: Trees

2015-01-20 Thread Marko Rauhamaa
Terry Reedy tjre...@udel.edu: Others have answered as to why other special-purpose constrained-structure trees have not been added to the stdlib. Ordered O(log n) mappings are not special-purpose data structures. I'd say strings and floats are much more special-purpose than ordered mappings,

[issue23275] Can assign [] = (), but not () = []

2015-01-20 Thread eryksun
eryksun added the comment: In ast.c, set_context checks for assignment to an empty tuple, but not an empty list. case List_kind: e-v.List.ctx = ctx; s = e-v.List.elts; break; case Tuple_kind: if (asdl_seq_LEN(e-v.Tuple.elts)) {

Chennai Python User Group - January Meetup

2015-01-20 Thread Vijay Kumar
Hi Everyone, The Chennai Python User Group (Chennaipy) is meeting on 31st Jan, at IMSc, Chennai. For more details about the event, visit our meetup event page http://www.meetup.com/Chennaipy/events/219692997/ If you are interested, RSVP on our meetup page. Website: http://chennaipy.org Mailing

[issue23281] Access violation - pyc file

2015-01-20 Thread Brett Cannon
Brett Cannon added the comment: If it was created by a fuzzer then this isn't a bug as we do no validation of bytecode formatting as we assume it was generated by Python and not an external, malicious source. -- nosy: +brett.cannon resolution: - not a bug status: open - closed

Re: Trees

2015-01-20 Thread Rustom Mody
On Tuesday, January 20, 2015 at 7:03:56 PM UTC+5:30, Rustom Mody wrote: On Tuesday, January 20, 2015 at 11:38:27 AM UTC+5:30, Terry Reedy wrote: On 1/19/2015 5:06 PM, Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Sequences nested withing sequences can

[issue23281] Access violation - pyc file

2015-01-20 Thread Paweł Zduniak
Paweł Zduniak added the comment: This file is created by fuzzer -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23281 ___ ___ Python-bugs-list

Re: Trees

2015-01-20 Thread Mark Lawrence
On 20/01/2015 05:19, Marko Rauhamaa wrote: Mark Lawrence breamore...@yahoo.co.uk: On 19/01/2015 22:06, Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Probably because you'd never get agreement as to which specific tree and which specific implementation was

Re: Trees

2015-01-20 Thread Rustom Mody
On Tuesday, January 20, 2015 at 7:46:02 PM UTC+5:30, Marko Rauhamaa wrote: Rustom Mody : Yeah python has trees alright. Does Python balance them for you? No Does python support a menagerie of lists like C - singly linked, doubly linked, with header, without header etc? Or access to

Re: Trees

2015-01-20 Thread Rustom Mody
On Tuesday, January 20, 2015 at 11:38:27 AM UTC+5:30, Terry Reedy wrote: On 1/19/2015 5:06 PM, Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Sequences nested withing sequences can be regarded as trees, and Python has these. I regard Lisp as a tree

[issue23281] Access violation - pyc file

2015-01-20 Thread Eric V. Smith
Eric V. Smith added the comment: Was this file generated by CPython from a .py file? If so, can you share the .py file? If not, how was this file generated? As eryksun says, it appears to not be a valid .pyc file. -- nosy: +eric.smith ___ Python

Re: Random ALL CAPS posts on this group

2015-01-20 Thread Paul Rudin
Rick Johnson rantingrickjohn...@gmail.com writes: No one here would justify a public business refusing to serve or employ a person based on race, religion, sex, or otherwise. Depends on what you mean by or otherwise. So why would you so easily discriminate against speech? People

Re: Trees

2015-01-20 Thread TP
On Mon, Jan 19, 2015 at 6:46 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: I don't know if you've seen this http://kmike.ru/python-data-structures/ but maybe of interest. I haven't read but also possibly of interest: Data Structures and Algorithms in Python by Michael T. Goodrich, Roberto

Re: Trees

2015-01-20 Thread Marko Rauhamaa
Rustom Mody rustompm...@gmail.com: Yeah python has trees alright. Does Python balance them for you? Marko -- https://mail.python.org/mailman/listinfo/python-list

[issue23281] Access violation - pyc file

2015-01-20 Thread STINNER Victor
STINNER Victor added the comment: we assume it was generated by Python and not an external, malicious source. Said differently: you must not trust .py or .pyc downloaded from untrusted sources. Executing arbitary .py or .pyc file allows to execute arbitrary Python code. Instead of writing

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Joshua Landau
Joshua Landau added the comment: The problem seems to be that with the removal of -else if (TYPE(ch) == STAR) { -vararg = ast_for_expr(c, CHILD(n, i+1)); -if (!vararg) -return NULL; -i++; -} -else if (TYPE(ch) ==

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: Yes, thank you! That explained it. I am almost done fixing this patch. Here's my progress so far if you want to try it out. Just one test left to fix. -- Added file: http://bugs.python.org/file37790/starunpack5.diff

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-20 Thread Demian Brecht
Demian Brecht added the comment: TL;DR: Because HTTP is an application-level protocol, it's nearly impossible to gauge how a server will behave given a set of conditions. Because of that, any time that assumptions can be avoided, they should be. @R. David Murray: That is, if the connection

Re: Trees

2015-01-20 Thread Ian Kelly
On Tue, Jan 20, 2015 at 6:33 AM, Rustom Mody rustompm...@gmail.com wrote: from enum import Enum class TreeTag(Enum): I = 0 # An internal node L = 1 # A leaf node def __repr__(self): return self.name I = TreeTag.I L = TreeTag.L Explicitly tagging nodes as internal or leaves

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: All tests pass for me! Would anyone be kind enough to do a code review? -- Added file: http://bugs.python.org/file37791/starunpack6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292

Re: Trees

2015-01-20 Thread Paul Rubin
Marko Rauhamaa ma...@pacujo.net writes: As I said, I use ordered mappings to implement timers... The downside of heapq is that canceled timers often flood the heapq structure..., GvR mentioned a periodic garbage collection as a potentially effective solution. You could look up the timer

Re: Trees

2015-01-20 Thread Rustom Mody
On Tuesday, January 20, 2015 at 10:51:13 PM UTC+5:30, Ian wrote: On Tue, Jan 20, 2015 at 6:33 AM, Rustom Mody wrote: from enum import Enum class TreeTag(Enum): I = 0 # An internal node L = 1 # A leaf node def __repr__(self): return self.name I = TreeTag.I L =

pickle and then object changes

2015-01-20 Thread James Smith
Say an object like this exists: class test: a = b = You pickle it. You change the object definition to have a new field: class test a = b = c = You read the pickled object. Will it load but ignore the new field? That is what I want. --

Re: Trees

2015-01-20 Thread Rustom Mody
On Tuesday, January 20, 2015 at 11:46:11 PM UTC+5:30, Rustom Mody wrote: On Tuesday, January 20, 2015 at 10:51:13 PM UTC+5:30, Ian wrote: On Tue, Jan 20, 2015 at 6:33 AM, Rustom Mody wrote: # Converting to generators is trivial = :-) Less trivial than I

Re: pickle and then object changes

2015-01-20 Thread Peter Otten
James Smith wrote: Say an object like this exists: class test: a = b = You pickle it. You change the object definition to have a new field: class test a = b = c = You read the pickled object. Will it load but ignore the new field? That is what I want.

[issue23266] Faster implementation to collapse non-consecutive ip-addresses

2015-01-20 Thread Markus
Markus added the comment: My initial patch was wrong wrt. _find_address_range. It did not loop over equal addresses. Thats why performance with many equal addresses was degraded when dropping the set(). Here is a patch to fix _find_address_range, drop the set, and improve performance again.

Re: Trees

2015-01-20 Thread Paul Rubin
Marko Rauhamaa ma...@pacujo.net writes: So in my Python software (both at work and at home) needs, I use a Python AVL tree implementation of my own. My use case is timers. (GvR uses heapq for the purpose.) Have you benchmarked your version against heapq or even the builtin sorting functions?

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Changes by Neil Girdhar mistersh...@gmail.com: Added file: http://bugs.python.org/file37792/starunpack6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___

RE: Random ALL CAPS posts on this group

2015-01-20 Thread Clayton Kirkwood
-Original Message- From: Python-list [mailto:python-list- bounces+crk=godblessthe...@python.org] On Behalf Of Rick Johnson Sent: Monday, January 19, 2015 8:06 PM To: python-list@python.org Subject: Re: Random ALL CAPS posts on this group On Monday, January 19, 2015 at 8:16:01 PM UTC-6,

Student looking for a Scitki-Learn Numpy Tutor with a strong background in data science?

2015-01-20 Thread MK
In a Masters for Data Science and need the help using Python/R mainly. Please forward background(education, work) teaching experence in stats, linear algebra, programming (Scikit, Panda, Numpy), timezone, and rates. -- https://mail.python.org/mailman/listinfo/python-list

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-20 Thread Demian Brecht
Demian Brecht added the comment: Now I think I'd like to take my foot out of my mouth. Previous quick experiments that I had done were at the socket level, circumventing some of the logic in the HTTPResponse, mainly the calls to readline() rather than simple socket.recv(N). I've confirmed

Re: Trees

2015-01-20 Thread Paul Rubin
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Possibly because they aren't needed? Under what circumstances would you use a tree instead of a list or a dict or combination of both? I've sometimes wanted a functional tree in the sense of functional programming. That means the

[issue23280] Convert binascii.{un}hexlify to Argument Clinic (fix docstrings)

2015-01-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1cb2b46c5109 by Zachary Ware in branch '3.4': Issue #23280: Fix docstrings for binascii.(un)hexlify https://hg.python.org/cpython/rev/1cb2b46c5109 New changeset 754c630c98a3 by Zachary Ware in branch 'default': Merge with 3.4 (closes #23280)

[issue23280] Convert binascii.{un}hexlify to Argument Clinic (fix docstrings)

2015-01-20 Thread Zachary Ware
Zachary Ware added the comment: Thanks for the (very quick!) review, Serhiy. -- assignee: - zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23280 ___

Re: Trees

2015-01-20 Thread Ken Seehart
Exactly. There are over 23,000 different kinds of trees. There's no way you could get all of them to fit in a library, especially a standard one. Instead, we prefer to provide people with the tools they need to grow their own trees. http://caseytrees.org/programs/planting/ctp/

Re: Trees

2015-01-20 Thread Devin Jeanpierre
There are similarly many kinds of hash tables. For a given use case (e.g. a sorted dict, or a list with efficient removal, etc.), there's a few data structures that make sense, and a library (even the standard library) doesn't have to expose which one was picked as long as the performance is

[issue23266] Faster implementation to collapse non-consecutive ip-addresses

2015-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Only one duplicated address is degenerated case. When there is a lot of duplicated addresses in range the patch causes regression. $ ./python -m timeit -s import ipaddress; ips = [ipaddress.ip_address('2001:db8::%x' % (i%100)) for i in range(10)] --

Re: Trees

2015-01-20 Thread Chris Angelico
On Wed, Jan 21, 2015 at 7:15 AM, Ken Seehart k...@seehart.com wrote: Exactly. There are over 23,000 different kinds of trees. There's no way you could get all of them to fit in a library, especially a standard one. Instead, we prefer to provide people with the tools they need to grow their own

Re: How to run a python script with functions

2015-01-20 Thread André Roberge
On Tuesday, 20 January 2015 17:11:58 UTC-4, faiz@gmail.com wrote: Hi I have a file with a python scripts that has many functions in it. To run the script I did the following: 1. $ python (to initiate python, using the python command) 2. import file_name (without .py) 3.

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Joshua Landau
Joshua Landau added the comment: This was a rather minor fix; I basically moved from STORE_SUBSCR to STORE_MAP and fixed a BUILD_MAP opcode. -- Added file: http://bugs.python.org/file37795/starunpack7.diff ___ Python tracker rep...@bugs.python.org

[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-20 Thread Poor Yorick
Changes by Poor Yorick pooryor...@users.sourceforge.net: -- keywords: +patch Added file: http://bugs.python.org/file37796/34d54cc5ecfd.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23284

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Joshua Landau
Joshua Landau added the comment: Aye, I'd done so (see starunpack7.diff). It was the fuss to reapply it ontop of your newer diff and making sure I'd read at least *some* of the devguide before barging on. Anyhow, here's another small fix to deal with the [*[0] for i in [0]] problem. I'm not

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: I think there will still be a problem ceval with the way the dicts are combined unfortunately, but that should be easy to fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292

Re: Random ALL CAPS posts on this group

2015-01-20 Thread Denis McMahon
On Mon, 19 Jan 2015 16:15:58 -0800, Luke Tomaneng wrote: Has anyone noticed these? There have been about three of them recently and they don't seem to have anything to do with Python at all. Does anyone know if there is a good reason they are here? Abusive spam from idiots. I have a regex

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Joshua Landau
Joshua Landau added the comment: I'm getting f(x=5, **{'x': 1}, **{'x': 3}, y=2) Traceback (most recent call last): File stdin, line 1, in module TypeError: f() got multiple values for keyword argument 'x' Which, as I understand, is the correct result. I'm using

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Joshua Landau
Joshua Landau added the comment: The problem with using STORE_MAP is you create a new dict for each keyword argument in that situation. You don't; if you look at the disassembly for producing a built-in dict (dis.dis('{1:2, 2:3, 3:4}')) you'll see they use STORE_MAP too. STORE_MAP seems to

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Joshua Landau
Joshua Landau added the comment: I think I've got it working; I'm just working out how to make a patch and adding a test or two. I think I'll also need to sign the contributor agreement. While I'm at it, here are a few other deviations from the PEP: - {*()} and {**{}} aren't supported -

[issue23287] ctypes.util.find_library needlessly call crle on Solaris

2015-01-20 Thread John Beck
New submission from John Beck: On Solaris, in Lib/ctypes/util.py, we have code that looks for /usr/bin/crle and calls it to parse its output to try to determine the Default Library Path. This code broke recently (Solaris 12 build 65), as it expects to find a line starting with Default

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: Ah, nice! I didn't realize what STORE_MAP did. I thought it created a map each time. We'll just do it your way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292

Re: How to run a python script with functions

2015-01-20 Thread faiz . lotfy
On Tuesday, January 20, 2015 at 3:22:55 PM UTC-6, André Roberge wrote: On Tuesday, 20 January 2015 17:11:58 UTC-4, faiz@gmail.com wrote: Hi I have a file with a python scripts that has many functions in it. To run the script I did the following: 1. $ python (to initiate python,

[issue23208] asyncio: add BaseEventLoop._current_handle (only used in debug mode)

2015-01-20 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: asyncio: add BaseEventLoop._current_handle - asyncio: add BaseEventLoop._current_handle (only used in debug mode) ___ Python tracker rep...@bugs.python.org

[issue23285] PEP 475 - EINTR hanndling

2015-01-20 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- components: Library (Lib) hgrepos: 293 nosy: haypo, neologix, pitrou priority: normal severity: normal status: open title: PEP 475 - EINTR hanndling type: enhancement ___ Python tracker

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: Post it? It's just hg diff a.diff -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list

Re: Trees

2015-01-20 Thread Sturla Molden
On 20/01/15 01:49, Dan Stromberg wrote: I think probably the most common need for a tree is implementing a cache, That is probably true, at least if you're a squirrel. -- https://mail.python.org/mailman/listinfo/python-list

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: If there is a speed issue, the real answer I think is to add an opcode as suggested in the source code that coalesces keyword arguments into dicts rather than the weird dance as the previous authors described it, or turning each argument into an individual dict

[issue23285] PEP 475 - EINTR hanndling

2015-01-20 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file37797/ff1274594739.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23285

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: Thanks! I've incorporated your changes to deal with the [*[0] for i in [0]] problem, although I don't understand them yet. The problem with using STORE_MAP is you create a new dict for each keyword argument in that situation. I optimized that away. Good

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Guido van Rossum
Guido van Rossum added the comment: SGTM On Tue, Jan 20, 2015 at 4:08 PM, Neil Girdhar rep...@bugs.python.org wrote: Neil Girdhar added the comment: That makes sense. If you wanted to override, you could always write: f(**{**a, **b, 'x': 5}) rather than f(**a, **b, x=5) Should I

How to run a python script with functions

2015-01-20 Thread faiz . lotfy
Hi I have a file with a python scripts that has many functions in it. To run the script I did the following: 1. $ python (to initiate python, using the python command) 2. import file_name (without .py) 3. file_name.function_name(argument) (to run the function_name with argument (argument) My

[issue23285] PEP 475 - EINTR hanndling

2015-01-20 Thread Charles-François Natali
New submission from Charles-François Natali: The test runs fine on Linux, but hangs in test_send() on OS-X and *BSD. I don't know what's wrong, so if someone with access to one of these OS could have a look, it would be great. -- ___ Python tracker

[issue23285] PEP 475 - EINTR handling

2015-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps Ned can help on the OS X side of things. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23285 ___

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Guido van Rossum
Guido van Rossum added the comment: Let's tread careful here. In regular dicts, for better or for worse, {'x': 1, 'x': 2} is defined and returns {'x': 2}. But in keyword arg processing, duplicates are always rejected. This may be an area where we need to adjust the PEP to match that expectation.

[issue23285] PEP 475 - EINTR handling

2015-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: The review diff is weird: it seems it contains changes that aren't EINTR-related (see e.g. argparse.rst). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23285

[issue23199] libpython27.a in amd64 release is 32-bit

2015-01-20 Thread Zach Welch
Zach Welch added the comment: That's certainly an interesting data point. We are just beginning to use MinGW-w64 internally, so I do not have enough experience to confirm or deny that advice. For various reasons, we must use cross-compiling on a Linux host, so the advice to use a native

[issue23285] PEP 475 - EINTR handling

2015-01-20 Thread Ned Deily
Ned Deily added the comment: (It may be several days before I can spend much time on it but I will take a look.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23285 ___

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-20 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: asyncio: race condition when cancelling a _WaitHandleFuture - [Windows] asyncio: race condition when cancelling a _WaitHandleFuture ___ Python tracker rep...@bugs.python.org

Re: Trees

2015-01-20 Thread Mario
In article d34dbfbe-fe82-47dc-8bc3-c8773e2b7...@googlegroups.com, rustompm...@gmail.com says... Yeah python has trees alright. Heres' some simple tree-code Didn't you just demonstrate that Python has no trees and instead you have to implement them yourself (or use a third-party

[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-20 Thread Poor Yorick
New submission from Poor Yorick: Building Python-2.7.9 using --prefix, with an ncurses that's linked to libtinfo and a readline that isn't linked to any termcap library, I ran into the trouble that the curses module wan't buing build with the needed -L and -l flags for the libtinfo shared

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: Why is that correct? The PEP mentions overriding. Right now each dict overrides values from the last silently, which I think makes sense. The keyword arguments you pass in override keys from previous dicts (also good I think). The problem is that you can

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: That makes sense. If you wanted to override, you could always write: f(**{**a, **b, 'x': 5}) rather than f(**a, **b, x=5) Should I go ahead and fix it so that overriding is always wrong? E.g., f(**{'x': 3}, **{'x': 4}) which currently works? --

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: Could you try this and tell me how many BUILD_MAPs you're doing? dis.dis(def f(w, x, y, z, r): pass\nf(w=1, **{'x': 2}, y=3, z=4, r=5)) Mine does 2. -- ___ Python tracker rep...@bugs.python.org

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Neil Girdhar
Neil Girdhar added the comment: Thanks. It's probably compile.c under /* Same dance again for keyword arguments */. nseen remains zero and probably shouldn't. I need to learn more about the opcodes. -- ___ Python tracker rep...@bugs.python.org

[issue23208] asyncio: add BaseEventLoop._current_handle

2015-01-20 Thread STINNER Victor
STINNER Victor added the comment: @Guido, @Yury: What do you think of this feature? Does it make sense to expose (internally) the handle currently executed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23208

[issue23208] asyncio: add BaseEventLoop._current_handle

2015-01-20 Thread Yury Selivanov
Yury Selivanov added the comment: What do you think of this feature? Does it make sense to expose (internally) the handle currently executed? I think it's OK to have something like `loop._current_handle` to work ~only~ in debug mode. Enhancing `loop.call_exception_handler` to use it also

[issue23199] libpython27.a in amd64 release is 32-bit

2015-01-20 Thread Steve Dower
Steve Dower added the comment: Just came across this advice on https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows: Do not use MinGW-w64. As you will notice, the MinGW import library for Python (e.g. libpython27.a) is omitted from the AMD64 version of Python. This is

[issue2292] Missing *-unpacking generalizations

2015-01-20 Thread Joshua Landau
Joshua Landau added the comment: 2 here as well: 15 LOAD_CONST 2 ('w') 18 LOAD_CONST 3 (1) 21 BUILD_MAP1 24 LOAD_CONST 4 (2) 27 LOAD_CONST 5 ('x') 30 STORE_MAP 31 BUILD_MAP1 34 LOAD_CONST

[issue22947] Enable 'imageop' - Multimedia Srvices Feature module for 64-bit platform

2015-01-20 Thread koobs
Changes by koobs koobs.free...@gmail.com: -- nosy: +koobs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22947 ___ ___ Python-bugs-list mailing

Re: python traceroute

2015-01-20 Thread Steven D'Aprano
On Tue, 20 Jan 2015 19:37:26 -0800, Chandrakant Tiwari wrote: in the program below i want it to make it work the same way as TRACERT command . but i am not able to make it work the same way . for which i need your help thank you What is the difference between TRACERT and your Python

[issue23283] Backport Tools/clinic to 3.4

2015-01-20 Thread Larry Hastings
Larry Hastings added the comment: I would prefer the backport be more selective. There are other changes (set literals, fix --converters) in trunk that aren't in 3.4 and I wouldn't want them pulled in willy-nilly. However, I'd accept this backport if the patch looks minimal and clean.

[issue13299] namedtuple row factory for sqlite3

2015-01-20 Thread YoSTEALTH
YoSTEALTH added the comment: note: sqlite_namedtuplerow.patch _cache method conflicts with attached database with say common table.column name like id Using namedtuple method over sqlite3.Row was a terrible idea for me. I thought namedtuple is like tuple so should be faster then dict! wrong.

  1   2   >