Re: Language design

2015-06-02 Thread Steven D'Aprano
On Tuesday 02 June 2015 07:45, TheDoctor wrote: On Wednesday, September 11, 2013 at 6:40:22 PM UTC-5, Steven D'Aprano wrote: On Wed, 11 Sep 2013 14:30:54 -0700, Mark Janssen wrote: 1) It tried to make Object the parent of every class. Tried, and succeeded. Oh? How about: class

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Chris Angelico
On Tue, Jun 2, 2015 at 5:44 PM, Rustom Mody rustompm...@gmail.com wrote: Plates and spoons and knives and forks are objects. Cars and trucks and ships and planes are objects. Books and shoes and maps and compasses are objects. Buildings are objects. And blueprints of buildings are objects

[issue24358] Should compression file-like objects provide .fileno(), misleading subprocess?

2015-06-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +benjamin.peterson, pitrou, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24358 ___

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Rustom Mody
On Tuesday, June 2, 2015 at 2:08:08 PM UTC+5:30, Chris Angelico wrote: On Tue, Jun 2, 2015 at 5:44 PM, Rustom Mody wrote: Plates and spoons and knives and forks are objects. Cars and trucks and ships and planes are objects. Books and shoes and maps and compasses are objects. Buildings are

Re: Language design

2015-06-02 Thread Steven D'Aprano
On Tuesday 02 June 2015 10:10, TheDoctor wrote: On Friday, September 13, 2013 at 12:08:04 AM UTC-5, Steven D'Aprano wrote: Mark, you are digging up a conversation from nearly two years ago. Seriously? It makes no difference whether I write: atoms - stars - galaxies or

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: On Tue, Jun 2, 2015 at 5:44 PM, Rustom Mody rustompm...@gmail.com wrote: 1 ∈ all these Are the '∈'s here same? Similar? Yes, they are. Every one of them is asserting (or asking, depending on your point of view) whether or not the instance to its left is a

PyTexas Call For Proposals

2015-06-02 Thread Paul Bailey
The PyTexas 2015 Call for Proposals is open! Submit your talk proposals https://www.pytexas.org/2015/speakers/submit-talk today. You can submit an idea for a lightning talk (5 min), short talk (20 min), long talk (50 min), or tutorial (3 hrs). See our Call for Proposals

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Steven D'Aprano
On Tuesday 02 June 2015 10:24, TheDoctor wrote: A type is not an object in the same way an instantiated type is an object -- anymore than a blueprint for a building is the building itself. Nobody says that blueprints are *buildings*. But buildings are not the only kind of object that exists.

[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-06-02 Thread Mike Frysinger
Mike Frysinger added the comment: also, it looks like this bug is in python-3.3. not sure what the status of that branch is, but maybe the backport from 3.4 would be easy ? -- ___ Python tracker rep...@bugs.python.org

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Rustom Mody
On Tuesday, June 2, 2015 at 12:42:31 PM UTC+5:30, Steven D'Aprano wrote: On Tuesday 02 June 2015 10:24, TheDoctor wrote: A type is not an object in the same way an instantiated type is an object -- anymore than a blueprint for a building is the building itself. Nobody says that

[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24267 ___ ___ Python-bugs-list

[issue24360] improve argparse.Namespace __repr__ for invalid identifiers.

2015-06-02 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24360 ___

Knowledge Requirements for Machine Learning (SKLearn)

2015-06-02 Thread chrismeek4542
I would like to get into Machine learning. The problem I have is that my Math skills are sadly lacking. I went through SKlearn docs but it is beyond me. Could anyone recommended some resources to get up to speed with the subject? -- https://mail.python.org/mailman/listinfo/python-list

Re: What use of string module?

2015-06-02 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 19:14:18 -0700, fl writes: Hi, I read the online help about string. It lists string constants, string formatting, template strings and string functions. After reading these, I am still puzzled about how to use the string module. Could you show me a few example

Re: What use of string module?

2015-06-02 Thread Steven D'Aprano
On Tuesday 02 June 2015 12:14, fl wrote: Hi, I read the online help about string. It lists string constants, string formatting, template strings and string functions. After reading these, I am still puzzled about how to use the string module. Could you show me a few example about this

[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-06-02 Thread Mike Frysinger
Mike Frysinger added the comment: the original report on our side w/bunches of tracebacks: http://crbug.com/481223 with that traceback in hand, it's pretty trivial to write a reproduction :). attached! i couldn't figure out how to make it work w/out completely execing a new python instance.

Re: Language design

2015-06-02 Thread Chris Angelico
On Tue, Jun 2, 2015 at 5:19 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: but that's not what my second example says. Look closely, and consider that sometimes we write Mark's hat and sometimes the hat of Mark. ... and sometimes the hat Mark's talking through, which appears to

Re: for...else

2015-06-02 Thread ast
Laura Creighton l...@openend.se a écrit dans le message de news:mailman.64.1433255400.13271.python-l...@python.org... You may be looking for dictionary dispatching. You can translate the key into a callable. def do_ping(self, arg): return 'Ping, {0}!'.format(arg) def do_pong(self, arg):

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Jon Ribbens
On 2015-06-02, BartC b...@freeuk.com wrote: On 02/06/2015 18:00, Steven D'Aprano wrote: Again, this is not relevant. Javascript is dynamically typed, but some values are machine primitives and other values are objects. The interpreter keeps track of this at runtime. Javascript primitives

[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2015-06-02 Thread sping
sping added the comment: I guess supporting older upstream versions would be nice in this case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24266 ___

[issue24365] Conditionalize 3.5 additions to the stable ABI

2015-06-02 Thread Petr Viktorin
Petr Viktorin added the comment: I meant stable ABI, of course -- title: Conditionalize 3.5 additions to the stable API - Conditionalize 3.5 additions to the stable ABI ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24365

[issue24355] Provide a unittest api for controlling verbosity in tests

2015-06-02 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +ezio.melotti, michael.foord, rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24355 ___ ___

Re: Everything is an object in python - object class and type class

2015-06-02 Thread BartC
On 02/06/2015 18:00, Steven D'Aprano wrote: On Tue, 2 Jun 2015 10:49 pm, BartC wrote: On 02/06/2015 12:27, Steven D'Aprano wrote: In the programming language Java, *some* values are objects, and some values are not objects. In the programming language Python, *all* values are objects, in

Re: Everything is an object in python - object class and type class

2015-06-02 Thread random832
On Tue, Jun 2, 2015, at 13:59, BartC wrote: On 02/06/2015 18:00, Steven D'Aprano wrote: Again, this is not relevant. Javascript is dynamically typed, but some values are machine primitives and other values are objects. The interpreter keeps track of this at runtime. Javascript

Re: Could you explain lambda function to me?

2015-06-02 Thread Chris Kaynor
On Tue, Jun 2, 2015 at 11:14 AM, fl rxjw...@gmail.com wrote: Hi, I see the description of lambda at the online tutorial, but I cannot understand it. '42' is transferred to the function. What 'x' value should be? I do not see it says that it is '0'. And, what is 'x'? The lambda keyword is

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Jon Ribbens
On 2015-06-02, Dr. Bigcock dreamingforw...@gmail.com wrote: It doesn't really do anything. No one uses integers as objects. (Any dissenters?) Yes. *Everyone* uses integers as objects. Containers such as lists and dictionaries and tuples etc contain objects. If integers weren't objects then you

Re: Could you explain lambda function to me?

2015-06-02 Thread ast
fl rxjw...@gmail.com a écrit dans le message de news:323866d1-b117-4785-ae24-7d04c49bc...@googlegroups.com... Hi, def make_incrementor(n): ... return lambda x: x + n ... f = make_incrementor(42) f(0) 42 f(1) 43 make_incrementor is a fonction which return a function ! and the

[issue24365] Conditionalize 3.5 additions to the stable ABI

2015-06-02 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +ncoghlan stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24365 ___

[issue7559] TestLoader.loadTestsFromName swallows import errors

2015-06-02 Thread R. David Murray
R. David Murray added the comment: It looks to me like this is complete, so closing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559 ___ ___

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Ian Kelly
On Tue, Jun 2, 2015 at 12:10 PM, Ned Batchelder n...@nedbatchelder.com wrote: On Tuesday, June 2, 2015 at 1:59:37 PM UTC-4, BartC wrote: Javascript primitives include Number and String. What does Python allow to be done with its Number (int, etc) and String types that can't be done with their

Could you explain lambda function to me?

2015-06-02 Thread fl
Hi, I see the description of lambda at the online tutorial, but I cannot understand it. '42' is transferred to the function. What 'x' value should be? I do not see it says that it is '0'. And, what is 'x'? def make_incrementor(n): ... return lambda x: x + n ... f =

[issue24352] Provide a way for assertLogs to optionally not hide the logging output

2015-06-02 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +ezio.melotti, michael.foord, rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24352 ___ ___

[issue24362] Simplify the fast nodes resize logic in C OrderedDict.

2015-06-02 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24362 ___ ___ Python-bugs-list

[issue20155] Regression test test_httpservers fails, hangs on Windows

2015-06-02 Thread R. David Murray
R. David Murray added the comment: Terry: the slowdown might be IPV6 handling, which was a bit broken on windows. In any case, I think the slowdown should be treated as a separate issue if you care about it, so I'm going to close this. (I think it would be great if someone would do a review

[issue24365] Conditionalize 3.5 additions to the stable API

2015-06-02 Thread Petr Viktorin
New submission from Petr Viktorin: I have sent patches to 3.5 that add new stable API, and later I learned [0] that additions should be conditional on the value of Py_LIMITED_API. This patch adds #ifdef blocks for what was added in issues #24268 and #24345. [0]

[issue22725] improve documentation for enumerate() (built-in function)

2015-06-02 Thread R. David Murray
R. David Murray added the comment: Per Raymond's last message, closing this as rejected. -- assignee: rhettinger - docs@python stage: needs patch - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22725

[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

2015-06-02 Thread R. David Murray
R. David Murray added the comment: Looks like Serhiy forgot to close this, so closing it. -- assignee: serhiy.storchaka - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23171 ___

Re: for...else

2015-06-02 Thread Laura Creighton
In a message of Tue, 02 Jun 2015 19:46:54 +0200, ast writes: Laura Creighton l...@openend.se a écrit dans le message de news:mailman.64.1433255400.13271.python-l...@python.org... You may be looking for dictionary dispatching. You can translate the key into a callable. def do_ping(self,

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Ned Batchelder
On Tuesday, June 2, 2015 at 1:59:37 PM UTC-4, BartC wrote: On 02/06/2015 18:00, Steven D'Aprano wrote: On Tue, 2 Jun 2015 10:49 pm, BartC wrote: On 02/06/2015 12:27, Steven D'Aprano wrote: In the programming language Java, *some* values are objects, and some values are not objects.

[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2015-06-02 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24266 ___

Please help on this sorted function

2015-06-02 Thread fl
Hi, I try to learn sorted(). With the tutorial example: ff=sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'}) ff [1, 2, 3, 4, 5] I don't see what sorted does in this dictionary, i.e. the sequence of 1..5 is unchanged. Could you explain it to me? Thanks, --

Re: Please help on this sorted function

2015-06-02 Thread Joonas Liik
my_dict = {1: 'D', 2: 'B', 3: 'A', 4: 'E', 5: 'B'} # dict.items() returns an iterator that returns pairs of (key, value) pairs # the key argument to sorted tells sorted what to sort by, operator.itemgetter is a factory function , itemgetter(1)== lambda iterable: iterable[1] sorted_dict =

[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

2015-06-02 Thread R. David Murray
R. David Murray added the comment: No, I just had a stale tab :( :( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23171 ___ ___

Re: Please help on this sorted function

2015-06-02 Thread fl
On Tuesday, June 2, 2015 at 1:20:40 PM UTC-7, fl wrote: Hi, I try to learn sorted(). With the tutorial example: ff=sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'}) ff [1, 2, 3, 4, 5] I don't see what sorted does in this dictionary, i.e. the sequence of 1..5 is unchanged.

Re: Please help on this sorted function

2015-06-02 Thread Joonas Liik
ff=sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'}) ff [1, 2, 3, 4, 5] sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'}) is equivalent to sorted(iter({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'})) and iter(dict) iterates over the dict keys, so when you do iter({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5:

Re: fork/exec close file descriptors

2015-06-02 Thread Alain Ketterlin
Marko Rauhamaa ma...@pacujo.net writes: Alain Ketterlin al...@universite-de-strasbourg.fr.invalid: The close(2) manpage has the following warning on my Linux system: | Not checking the return value of close() is a common but | nevertheless serious programming error. It is quite possible

Re: fork/exec close file descriptors

2015-06-02 Thread Marko Rauhamaa
Alain Ketterlin al...@universite-de-strasbourg.fr.invalid: The close(2) manpage has the following warning on my Linux system: | Not checking the return value of close() is a common but | nevertheless serious programming error. It is quite possible that | errors on a previous write(2)

[issue19699] Update zipimport for PEP 451

2015-06-02 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19699 ___ ___ Python-bugs-list mailing

[issue23440] Extend http.server.SimpleHTTPRequestHandler testing

2015-06-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23440 ___

[issue24369] Using OrderedDict.move_to_end during iteration is problematic.

2015-06-02 Thread Eric Snow
New submission from Eric Snow: While the dict/OrderedDict iterators already check for additions and deletions, using the OrderedDict.move_to_end during iteration can lead to surprising results. The following results in an infinite loop: od = OrderedDict.fromkeys('abc') last = None

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Michael Del Monte
Michael Del Monte added the comment: I don't want to speak out of school and you guys certainly know what you're doing, but it seems a shame to go through these gyrations -- lookahead plus unreading lines -- only to preserve the ability to parse email headers, when HTTP really does follow a

[issue24368] Some C OrderedDict methods need to support keyword arguments.

2015-06-02 Thread Eric Snow
Eric Snow added the comment: Here's a patch with tests. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file39601/issue24368-kwargs.diff ___ Python tracker rep...@bugs.python.org

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Ian Kelly
On Tue, Jun 2, 2015 at 3:47 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: The classic response to Super Considered Harmful for those who may be interested is https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ and recently https://www.youtube.com/watch?v=EiOglTERPEo I feel

Re: fork/exec close file descriptors

2015-06-02 Thread Chris Angelico
On Wed, Jun 3, 2015 at 7:06 AM, Alain Ketterlin al...@universite-de-strasbourg.fr.invalid wrote: I've no idea what the OP's program was doing, so I'm not going to split hairs. I can't imagine why one would like to mass-close an arbitrary set of file descriptors, and I think APIs like

Re: Please help on this sorted function

2015-06-02 Thread Chris Angelico
On Wed, Jun 3, 2015 at 6:25 AM, fl rxjw...@gmail.com wrote: I am still new to Python. How to get the sorted dictionary output: {1: 'D', 2: 'B', 3: 'A', 4: 'E', 5: 'B'} Since dictionaries don't actually have any sort of order to them, the best thing to do is usually to simply display it in

[issue24368] Some C OrderedDict methods need to support keyword arguments.

2015-06-02 Thread Eric Snow
New submission from Eric Snow: Several methods were implemented using PyArg_UnpackTuple and need to use PyArg_ParseTupleAndKeywords instead. -- assignee: eric.snow components: Library (Lib) messages: 244716 nosy: eric.snow priority: release blocker severity: normal stage: needs patch

[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-06-02 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24320 ___

[issue24361] OrderedDict: crash with threads

2015-06-02 Thread Eric Snow
Eric Snow added the comment: FYI, this doesn't crash when I have the patch from issue24362 applied. -- assignee: - eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24361 ___

[issue24270] PEP 485 (math.isclose) implementation

2015-06-02 Thread Yury Selivanov
Yury Selivanov added the comment: Can this issue be closed now? -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24270 ___ ___

[issue24252] IDLE removes elements from tracebacks.

2015-06-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Your message arrived as I was just starting on this issue, wondering whether the exclusion of threading and queue blocks is proper and wishing for an easy test example, such as you provided. It verifies the issue in 3.x. It also answers the question:

[issue24367] Idle hangs when you close the debugger while debugging

2015-06-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Previous issue has a patch that needs independent review. -- resolution: - duplicate stage: - resolved status: open - closed superseder: - IDLE - shell becomes unresponsive if debugger windows is closed while active.

Re: Can Python function return multiple data?

2015-06-02 Thread Chris Angelico
On Wed, Jun 3, 2015 at 7:27 AM, fl rxjw...@gmail.com wrote: I just see the tutorial says Python can return value in function, it does not say multiple data results return situation. In C, it is possible. How about Python on a multiple data return requirement? Technically, neither C nor Python

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray
R. David Murray added the comment: No, the point is to do best practical error recovery when faced with dirty data that may be dirty in various ways, and it doesn't really matter whether it is http headers or email headers. A line with leading whitespace is treated as part of the preceding

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Martin Panter
Martin Panter added the comment: Regarding the suggested fix for Python 2, make sure it does not prematurely end the parsing on empty folded lines (having only tabs and spaces in them). E.g. according to RFC 7230 this should be a single header field: bHeader: obsolete but\r\n b\r\n b

Re: fork/exec close file descriptors

2015-06-02 Thread Skip Montanaro
Folks, I'm not interested in rehashing this. I don't know what all the open file descriptors are. Some/many/most will have been opened by underlying C++ libraries and will not have been opened by code at the Python level. I do think the addition of an os.fsync() attempt on each file descriptor

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Grant Edwards
On 2015-06-02, Ian Kelly ian.g.ke...@gmail.com wrote: Sorry. I meant object in the sense of OOP: something you might extend or make a derived class with. I'm not sure you get to define which properties of objects you want not to count. Accepting for the sake of argument that something to

[issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update

2015-06-02 Thread R. David Murray
R. David Murray added the comment: Yes, this is fixed, as the issue resolution says. If you are curious about the fix, follow the links to the commits starting in msg197116. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue4753] Faster opcode dispatch on gcc

2015-06-02 Thread David Bolen
David Bolen added the comment: Oops, sorry, I had just followed the commit comment to this issue. For the record here, it looks like Benjamin has committed an update (5e8fa1b13516) that resolves the problem. -- ___ Python tracker

[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-06-02 Thread Larry Hastings
Larry Hastings added the comment: Then you may fire when ready. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24320 ___ ___ Python-bugs-list

[issue18003] lzma module very slow with line-oriented reading.

2015-06-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Nous disions que tu aurais probablement à valider ce changement, mais que nous pourrions peut-être aussi le faufiler discrètement dans la base de code, vu que tu ne lis pas ces message. -- ___ Python tracker

Re: What is the difference between list() and list?

2015-06-02 Thread John Gordon
In 3ada3275-68c9-421c-aa19-53c312c42...@googlegroups.com fl rxjw...@gmail.com writes: I find the following results are interesting, but I don't know the difference between list() and list. 'list()' invokes the list class, which creates and returns a new list. Since you haven't passed any

Re: fork/exec close file descriptors

2015-06-02 Thread Marko Rauhamaa
Alain Ketterlin al...@universite-de-strasbourg.fr.invalid: Marko Rauhamaa ma...@pacujo.net writes: First, if close() fails, what's a poor program to do? Warn the user? Not assume everything went well? It all depends on the application, and what the file descriptor represents. The problem

[issue24366] Simple indentation

2015-06-02 Thread Daniel
Changes by Daniel danielciugur...@yahoo.com: -- files: indent.patch keywords: patch nosy: li4ick priority: normal severity: normal status: open title: Simple indentation versions: Python 3.6 Added file: http://bugs.python.org/file39597/indent.patch

[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-06-02 Thread Eric Snow
Eric Snow added the comment: Hmm. Looks like the fix in setuptools/pkg_resources is 17.0. [1] The bundled pip to which we just updated is 7.0.3, which appears to bundle pkg_resources 15.0. [2] So unless I've misunderstood, the hack will have to linger for a bit longer. Here's a patch for

[issue24365] Conditionalize 3.5 additions to the stable ABI

2015-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset c835dd16539a by Yury Selivanov in branch '3.5': Issue 24365: Conditionalize PEP 489 additions to the stable ABI https://hg.python.org/cpython/rev/c835dd16539a New changeset fd265fa89c36 by Yury Selivanov in branch 'default': Issue 24365: Merge 3.5

Re: Where is 'palindrome' defined?

2015-06-02 Thread John Ladasky
On Monday, June 1, 2015 at 2:22:02 AM UTC-7, Marko Rauhamaa wrote: Sota-apina nakataan raastimeen. Apelle pane emit. Saarnaa takanani paatos. (= The war monkey will be chucked into a grater. Hand the pistils to father-in-law. Pathos does preach

Re: Can Python function return multiple data?

2015-06-02 Thread Joel Goldstick
On Tue, Jun 2, 2015 at 5:27 PM, fl rxjw...@gmail.com wrote: Hi, I just see the tutorial says Python can return value in function, it does not say multiple data results return situation. In C, it is possible. How about Python on a multiple data return requirement? Thanks, --

Re: Can Python function return multiple data?

2015-06-02 Thread John Gordon
In 3bbe49da-e989-4a8c-a8a9-75d3a786f...@googlegroups.com fl rxjw...@gmail.com writes: Hi, I just see the tutorial says Python can return value in function, it does not say multiple data results return situation. In C, it is possible. How about Python on a multiple data return requirement?

[issue24252] IDLE removes elements from tracebacks.

2015-06-02 Thread ppperry
ppperry added the comment: This problem also occurs in other situati, such as when trying to get items from an empty queue import Queue Q = Queue.Queue() q.get_nowait() Traceback (most recent call last): File pyshell#16, line 1, in module q.get_nowait() Empty In that case, it doesn't

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Marko Rauhamaa
Grant Edwards invalid@invalid.invalid: On 2015-06-02, Ian Kelly ian.g.ke...@gmail.com wrote: Accepting for the sake of argument that something to be subclassed is a reasonable definition of object, Huh? You can't subclass an object. You can subclass a Class. More to the point: you don't

Re: Where is 'palindrome' defined?

2015-06-02 Thread Marko Rauhamaa
John Ladasky john_lada...@sbcglobal.net: On Monday, June 1, 2015 at 2:22:02 AM UTC-7, Marko Rauhamaa wrote: Sota-apina nakataan raastimeen. Apelle pane emit. Saarnaa takanani paatos. (= The war monkey will be chucked into a grater. Hand the pistils to

[issue24342] coroutine wrapper reentrancy

2015-06-02 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24342 ___

[issue24362] Simplify the fast nodes resize logic in C OrderedDict.

2015-06-02 Thread Eric Snow
Eric Snow added the comment: Here's a patch that adds stores the hash on each node. This eliminates the need to call PyObject_Hash when rebuilding the fast nodes table during a resize. The patch also drops a superfluous while loop. -- keywords: +patch stage: needs patch - patch

What is the difference between list() and list?

2015-06-02 Thread fl
Hi, I find the following results are interesting, but I don't know the difference between list() and list. nums=list() nums [] xx=list xx type 'list' nums [] print(xx) type 'list' print(nums) [] Could you tell me that? Thanks, --

Re: Can Python function return multiple data?

2015-06-02 Thread sohcahtoa82
On Tuesday, June 2, 2015 at 2:27:37 PM UTC-7, fl wrote: Hi, I just see the tutorial says Python can return value in function, it does not say multiple data results return situation. In C, it is possible. How about Python on a multiple data return requirement? Thanks, You return a

[issue18003] lzma module very slow with line-oriented reading.

2015-06-02 Thread Larry Hastings
Larry Hastings added the comment: Quoi? Je comprends que le français. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18003 ___ ___

[issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update

2015-06-02 Thread Etienne Le Sueur
Etienne Le Sueur added the comment: Thanks, I had missed that message. On 6/2/15 4:39 PM, R. David Murray wrote: R. David Murray added the comment: Yes, this is fixed, as the issue resolution says. If you are curious about the fix, follow the links to the commits starting in msg197116.

[issue18003] lzma module very slow with line-oriented reading.

2015-06-02 Thread Larry Hastings
Larry Hastings added the comment: If I understand this correctly, I can ignore everything up to May 2015, as it has to do with line-reading a compressed binary file (!) being slow. Then, Martin Panter proposes a new optimization in May 2015, which is to simply add __iter__ methods to

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray
R. David Murray added the comment: I think there may be a way to accomplish this in a reasonably straightforward fashion in python3 given that feedparser has an 'unreadline' function. The python2 case is probably going to be a more complicated change. And I agree that multiple lines should

[issue24367] Idle hangs when you close the debugger while debugging

2015-06-02 Thread ppperry
New submission from ppperry: [DEBUG ON] some_code (debugger closed before pressing any buttons) [DEBUG OFF] more_code (no response) -- components: IDLE messages: 244707 nosy: kbk, ppperry, roger.serwy, terry.reedy priority: normal severity: normal status: open title: Idle hangs when

[issue18003] lzma module very slow with line-oriented reading.

2015-06-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: This looks good to me. Larry would probably have to validate it for 3.5, although we may try to sneak it in (he isn't reading :-D). -- nosy: +larry ___ Python tracker rep...@bugs.python.org

Can Python function return multiple data?

2015-06-02 Thread fl
Hi, I just see the tutorial says Python can return value in function, it does not say multiple data results return situation. In C, it is possible. How about Python on a multiple data return requirement? Thanks, -- https://mail.python.org/mailman/listinfo/python-list

Re: What is the difference between list() and list?

2015-06-02 Thread Joel Goldstick
On Tue, Jun 2, 2015 at 5:33 PM, fl rxjw...@gmail.com wrote: Hi, I find the following results are interesting, but I don't know the difference between list() and list. nums=list() nums [] xx=list xx type 'list' nums [] print(xx) type 'list' print(nums) [] Could you tell

[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-06-02 Thread Larry Hastings
Larry Hastings added the comment: Sounds okay in theory. Is the bug in question now tested in our regression suite? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24320 ___

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Cory Benfield
Cory Benfield added the comment: This is one of those bugs that's actually super tricky to correctly fix. The correct path is to have the goal of conservatively accepting as many headers as possible. Probably this means looking ahead to the next few lines and seeing if they appear to roughly

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24363 ___ ___

[issue24365] Conditionalize 3.5 additions to the stable ABI

2015-06-02 Thread Nick Coghlan
Nick Coghlan added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24365 ___ ___ Python-bugs-list mailing list

[issue24342] coroutine wrapper reentrancy

2015-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 19d613c2cd5f by Yury Selivanov in branch '3.5': Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully https://hg.python.org/cpython/rev/19d613c2cd5f New changeset 8a6db1679a23 by Yury Selivanov in branch 'default': Issue 24342:

[issue24366] Simple indentation

2015-06-02 Thread Roundup Robot
New submission from Roundup Robot: New changeset 035aa81c2ba8 by Yury Selivanov in branch '3.3': Issue 24366: Indent code (thanks to li4ick for reporting). https://hg.python.org/cpython/rev/035aa81c2ba8 New changeset 95d1f38e540e by Yury Selivanov in branch '3.4': Issue 24366: Merge 3.3

[issue24366] Simple indentation

2015-06-02 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24366 ___

  1   2   >