[issue29328] struct module should support variable-length strings

2017-01-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the existence of netstruct https://github.com/stendec/netstruct does at least show that a coherent proposal is possible (the docs provide an API, motivation and examples). One question is whether this could be implemented in the stdlib struct module

Re: Problems with python3.6 on one system, but OK on another

2017-01-23 Thread dieter
Cecil Westerhof writes: > I build python3.6 on two systems. On one system everything is OK: > Python 3.6.0 (default, Jan 21 2017, 11:19:56) > [GCC 4.9.2] on linux > Type "help", "copyright", "credits" or "license" for more information. > > > But on another I get: > Could not

[issue28999] Use Py_RETURN_NONE and like

2017-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2c724f45f23f by Serhiy Storchaka in branch 'default': Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever https://hg.python.org/cpython/rev/2c724f45f23f -- ___ Python tracker

[issue26729] Incorrect __text_signature__ for sorted

2017-01-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> serhiy.storchaka ___ Python tracker ___

[issue29347] Python 2.7.8 is crashing while creating weakref for a given object.

2017-01-23 Thread Christian Heimes
Christian Heimes added the comment: Can you reproduce the issue with a more recent version of Python 2.7? 2.7.8 is pretty old. -- nosy: +christian.heimes ___ Python tracker

[issue29338] Output the text signature in the help of a class

2017-01-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks fine and meets a real need. I say go ahead and apply it if no other objections arise. -- ___ Python tracker

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2017-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We can't just add API functions in maintained releases, because it will break the stable ABI. We can use them only when explicitly define the version of API. Proposed patch for 3.6 and 3.7 adds public API functions PySlice_Unpack() and

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-23 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: There's a hidden Python 2 print call in the script that only gets reached after you move the Doc/ folder outside the main CPython directory and run `make html`. Additionally, an obsolete way of assuring a file gets closed is used (changed to use

[issue29339] Interactive: Move to same indentation level as previous line

2017-01-23 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: I'm not exactly sure what you mean but, since this isn't a bug per se and is more of a subjective opinion on how the REPL should handle the indentation level, you should probably ask *first* on python-ideas to get input from other members. (See

[issue28999] Use Py_RETURN_NONE and like

2017-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Raymond. I didn't expect to get an approval from you and were ready to withdraw the patch. I myself were just +0 on pushing these changes. Omitted changes in Modules/xx*.c and added few changes which Coccinelle missed. -- resolution: ->

[issue26729] Incorrect __text_signature__ for sorted

2017-01-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, do you want to apply this? -- ___ Python tracker ___ ___

[issue28749] Fixed the documentation of the mapping codec APIs

2017-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: >> The only part that is not correct is "single string characters". >> This should read "single bytes" or "bytes strings of length 1". > > This is not correct. Decoding mappings map not bytes strings, but integers. Looking at the implementation, you're

[issue28651] Make objects with empty __slots__ GC types

2017-01-23 Thread STINNER Victor
STINNER Victor added the comment: This issue was mentioned in another issue when a refleak was found: http://bugs.python.org/issue24379#msg280456 -- nosy: +haypo ___ Python tracker

[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2017-01-23 Thread STINNER Victor
STINNER Victor added the comment: Antoine Pitrou: "Benchmarks and Intel's recommendation show that aligned allocation is actually important for AVX performance, and NumPy depends on CPython providing the right allocation APIs (for integration with tracemalloc):

[issue29338] Output the text signature in the help of a class

2017-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset cebc9c7ad195 by Serhiy Storchaka in branch 'default': Issue #29338: Don't output an empty signature for class constructor. https://hg.python.org/cpython/rev/cebc9c7ad195 -- ___ Python tracker

Re: Using python to start programs after logging in

2017-01-23 Thread Cecil Westerhof
On Thursday 19 Jan 2017 20:08 CET, Cecil Westerhof wrote: > I am writing a python program to start the programs that need to be > started after logging in. I published what I have until now at: https://github.com/CecilWesterhof/PythonScripts/blob/master/startPrograms.py I do not mind some

[issue29338] Output the text signature in the help of a class

2017-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I forgot to run tests for such simple change! Thanks for reminder Xiang! -- ___ Python tracker ___

[issue29350] Add support of multiple signatures

2017-01-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Some functions can be described by the single signature. See examples in msg285647. Selected examples: dict.pop(key) dict.pop(key, default) type(obj) type(name, bases, mapping) range(stop) range(start, stop, step=1) min(iterable, *,

[issue29338] Output the text signature in the help of a class

2017-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Raymond. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28749] Fixed the documentation of the mapping codec APIs

2017-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: "bytes ordinals" is good term. Thank you. Here is an updated patch. > No, I'd prefer this deprecation to be undone as long as we > don't have a proper alternative for the API. This is different issue. -- Added file:

[issue29338] Output the text signature in the help of a class

2017-01-23 Thread Xiang Zhang
Xiang Zhang added the comment: The buildbots are failing due to test_pydoc. :-( -- nosy: +xiang.zhang ___ Python tracker ___

[issue29212] Python 3.6 logging thread name regression with concurrent.future threads

2017-01-23 Thread desbma
desbma added the comment: I don't think using repr(self) as a fallback was intentional, that is why I wrote regression, but I may be wrong. I agree that the previous default 'Thread-x' gives little information, but only the user can give a relevant name to describe what a thread is doing.

[issue29338] Output the text signature in the help of a class

2017-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3d5dcdf26fab by Serhiy Storchaka in branch 'default': Issue #29338: The help of a builtin or extension class now includes the https://hg.python.org/cpython/rev/3d5dcdf26fab -- nosy: +python-dev ___

[issue29212] Python 3.6 logging thread name regression with concurrent.future threads

2017-01-23 Thread INADA Naoki
INADA Naoki added the comment: OK. I'll wait for another opinions. -- ___ Python tracker ___ ___

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2017-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset ffb2534fcbf1 by Victor Stinner in branch '3.6': Issue #26273: Document TCP_USER_TIMEOUT and TCP_CONGESTION https://hg.python.org/cpython/rev/ffb2534fcbf1 -- ___ Python tracker

Re: Adding colormaps?

2017-01-23 Thread blue
you have here a full example , for another version not significant changes: http://matplotlib.org/examples/color/colormaps_reference.html -- https://mail.python.org/mailman/listinfo/python-list

[issue24379] Add operator.subscript as a convenience for creating slices

2017-01-23 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue29336] merge tuples in module

2017-01-23 Thread INADA Naoki
INADA Naoki added the comment: Thanks. Your patch reduced memory consumption by 2%, and number of tuples by 15%. $ cat invtuple.py import app import sys import traceback import tracemalloc print(tracemalloc.get_traced_memory()) allobj = sys.getobjects(0, tuple) print(len(allobj)) $

Pygments 2.2 released

2017-01-23 Thread Georg Brandl
I'm happy to announce the release of Pygments 2.2. Pygments is a generic syntax highlighter written in Python. There is a again lots of news in the 2.2 release, please have a look at the changelog . There are about 20 new languages supported, and a few other

[issue28518] execute("begin immediate") throwing OperationalError

2017-01-23 Thread Ma Lin
Ma Lin added the comment: If the answer is (no, no) , the behavior strictly follows the doc changes in commit 284676cf2ac8. Anyway, I'm not a deep user of SQLite, I can't give further advices. :( -- ___ Python tracker

[issue28518] execute("begin immediate") throwing OperationalError

2017-01-23 Thread Berker Peksag
Berker Peksag added the comment: > 1. Should we add the VACUUM with a explicit commit? Maybe there should > be an implicit commit before VACUUM? VACUUM is often an expensive operation so I think people should need to explicitly handle it anyway. > 2. Should a SELECT start a transaction? I

[issue29325] pysqlite: Evaluate removal of sqlite3_stmt_readonly

2017-01-23 Thread Ma Lin
Ma Lin added the comment: Just remind, there is a chance to remove sqlite3_stmt_readonly(). :) -- nosy: +berker.peksag, palaviv ___ Python tracker ___

Sphinx-1.5.2 has been released

2017-01-23 Thread Komiya Takeshi
Hi all, I'm delighted to announce the release of Sphinx 1.5.2, now available on the Python package index at . It includes about 5 new feature and 28 bug fixes for the 1.5.1 release series. For the full changelog, go to

[issue29351] absolute imports for logging

2017-01-23 Thread Markus Gerstel
New submission from Markus Gerstel: Running 'import logging' causes at minimum 46 failing 'open' and 12 failing 'stat' calls because python looks for packages inside python/Lib/logging which will never be there, in particular: sys, os, time, cStringIO, traceback, warnings, weakref,

pytest 3.0.6 released

2017-01-23 Thread opensoruce
pytest-3.0.6 pytest 3.0.6 has just been released to PyPI. This is a bug-fix release, being a drop-in replacement. To upgrade:: pip install --upgrade pytest The full changelog is available at http://doc.pytest.org/en/latest/changelog.html. Thanks to all who contributed to

[issue29152] unittest subTest does not call addFailure

2017-01-23 Thread kristall
kristall added the comment: Thanks for the quick 1st response. Since I put that part of my script on hold, I'd like to ask if it is possible to estimate when Antoine will have a look at this? Thanks in advance. -- ___ Python tracker

Re: [Python-ideas] "Immutable Builder" Pattern and Operator

2017-01-23 Thread M.-A. Lemburg
On 23.01.2017 14:28, Soni L. wrote: > > > On 23/01/17 11:18 AM, M.-A. Lemburg wrote: >> On 23.01.2017 14:05, Soni L. wrote: >>> Yeah but the dotequals operator has many other benefits: >>> >>> long_name .= __call__ # cast to callable >>> long_name .= wrapped # unwrap >>> etc >>> >>> And it

[issue26729] Incorrect __text_signature__ for sorted

2017-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0a9fb3e19b9 by Serhiy Storchaka in branch '3.5': Issue #26729: Fixed __text_signature__ for sorted(). https://hg.python.org/cpython/rev/c0a9fb3e19b9 New changeset fcb19fb42058 by Serhiy Storchaka in branch '3.6': Issue #26729: Fixed

[issue26729] Incorrect __text_signature__ for sorted

2017-01-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2017-01-23 Thread STINNER Victor
STINNER Victor added the comment: > Patch looks good to me. Oh, I forgot socket_doc.patch! Thanks Serhiy for the reminder and Martin for the review :-) I just pushed the patch. -- resolution: -> fixed status: open -> closed ___ Python tracker

Re: How to create a socket.socket() object from a socket fd?

2017-01-23 Thread Antoon Pardon
Op 22-01-17 om 01:52 schreef Grant Edwards: > Newsgroups: gmane.comp.python.general > From: Grant Edwards > Subject: Re: How to create a socket.socket() object from a socket fd? > References: > >

[issue29136] Add OP_NO_TLSv1_3

2017-01-23 Thread Christian Heimes
Christian Heimes added the comment: No, of course it does not work (yet): $ LD_LIBRARY_PATH=. apps/openssl ciphers TLS13 Error in cipher list 140546693477888:error:1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no cipher match:ssl/ssl_lib.c:2100: --

[issue29352] provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences

2017-01-23 Thread Akira Li
New submission from Akira Li: I've failed to find where the behavior for negative indices in s[i:j] expression (i, j < -len(s)) for standard sequences (str, list, etc) is formally defined. The observed behavior implemented in PySlice_GetIndicesEx(): If "len(s) + i" or "len(s) + j" is negative,

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2017-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch for longobject.c addresses Martin's comments. -- Added file: http://bugs.python.org/file46392/clinic_longobject_v4.patch ___ Python tracker

[issue28876] bool of large range raises OverflowError

2017-01-23 Thread Mark Dickinson
Mark Dickinson added the comment: Latest patch LGTM too. -- ___ Python tracker ___ ___ Python-bugs-list

Re: [Python-ideas] "Immutable Builder" Pattern and Operator

2017-01-23 Thread breamoreboy
On Monday, January 23, 2017 at 2:11:53 PM UTC, M.-A. Lemburg wrote: > On 23.01.2017 14:28, Soni L. wrote: > > > > > > On 23/01/17 11:18 AM, M.-A. Lemburg wrote: > >> On 23.01.2017 14:05, Soni L. wrote: > >>> Yeah but the dotequals operator has many other benefits: > >>> > >>> long_name .=

[issue29351] absolute imports for logging

2017-01-23 Thread Vinay Sajip
Vinay Sajip added the comment: There's nothing particular about logging here, is there? Any of the 2.7 stdlib modules will exhibit similar behaviour, since that __future__ import is not in general defined in the stdlib modules, other than in the test suite. --

[issue29136] Add OP_NO_TLSv1_3

2017-01-23 Thread Alex Gaynor
Alex Gaynor added the comment: We can easily just add `TLS13:...` at the from of our ciphersuite list and it'll be ok though right? (Note to self, do the same in urllib3, twisted, requests, god only knows what else) -- nosy: +alex ___ Python

[issue29351] absolute imports for logging

2017-01-23 Thread Markus Gerstel
Markus Gerstel added the comment: Yes, this is indeed the same for other stdlib modules, too. Logging is just the first one that came to attention in our investigations. I haven't prepared any other patches yet though, because your answer could easily be "No, we cannot consider these changes

[issue29339] Interactive: Move to same indentation level as previous line

2017-01-23 Thread 12345 67890
12345 67890 added the comment: I did not mark this as a bug. I marked it as an "enhancement" and I said that the priority was low. "I'm not exactly sure what you mean" In an IDE when developing in python, each time you press enter, the cursor is set to the same indentation level as the

[issue28876] bool of large range raises OverflowError

2017-01-23 Thread Akira Li
Akira Li added the comment: I've updated the patch to use 4-space indent (pep-7). I've added space around "=" (pep-7); unlike the usual "dict(designator=value)" -- no space around "=" for keyword argument (pep-8). -- Added file:

[issue29346] datetime.utcfromtimestamp() returns strange result for very large values

2017-01-23 Thread Eli Collins
Eli Collins added the comment: My apologies, I think Alexander is right, this is a duplicate of #29100 I'd seen the first message in that issue talking about a core dump, and thought this was different problem; but I see the scope of the issue broadened to cover general bounds issues in later

[issue18235] _sysconfigdata.py wrong on AIX installations

2017-01-23 Thread Michael Felt
Michael Felt added the comment: This is "only" for Python-2.7 (for now). The others will be tested as I am able. Working with the patch submitted 2013-10-19 (aka https://bugs.python.org/file32229/issue18235.patch) A) Without/before the patch: root@x064:[/data/prj/python/Python-2.7.13.0]grep

[issue29351] absolute imports for logging

2017-01-23 Thread Dries Desmet
Changes by Dries Desmet : -- nosy: +dries_desmet ___ Python tracker ___ ___ Python-bugs-list

[issue29351] absolute imports for logging

2017-01-23 Thread Markus Gerstel
Changes by Markus Gerstel : -- nosy: +vinay.sajip ___ Python tracker ___ ___

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Chris Angelico
On Tue, Jan 24, 2017 at 4:49 AM, Sourabh Kalal wrote: > how we can access the value from using id.. > like x=10 > id(x) > 3235346364 > > how i can read value 10 using id 3235346364 No, you can't. That isn't a memory address - it's just a unique identifier. Python doesn't

[issue29353] Incorrect handling of HTTP response with "Content-Type: message/rfc822" header

2017-01-23 Thread brokenenglish
New submission from brokenenglish: Hello. I found a bug that causes incorrect handling of some values of "Content-Type" header. When you retrieve any URL with "Content-Type: message/rfc822" header, additional payload is added to HTTPMessage. In some cases it causes annoing warnings. Here is

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Terry Reedy
On 1/23/2017 12:49 PM, Sourabh Kalal wrote: how we can access the value from using id.. like x=10 id(x) 3235346364 how i can read value 10 using id 3235346364 *In Python*, you cannot. Ids are mainly for internal use of implementations. Implementors also use them to test their

[issue29337] BytesWarning at compile time

2017-01-23 Thread Brett Cannon
Brett Cannon added the comment: LGTM -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list

[issue29339] Interactive: Move to same indentation level as previous line

2017-01-23 Thread Brett Cannon
Brett Cannon added the comment: Posting an idea directly to the issue tracker is fine as long as it's done in a reasonable fashion (i.e. not rudely). As for the specific idea, I assume this is for the REPL as used in a shell and not in IDLE. If you want to propose a patch that can work

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Skip Montanaro
On Mon, Jan 23, 2017 at 12:49 PM, Chris Angelico wrote: > > On Tue, Jan 24, 2017 at 4:49 AM, Sourabh Kalal wrote: > > how we can access the value from using id.. > > like x=10 > > id(x) > > 3235346364 > > > > how i can read value 10 using id 3235346364 >

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Peter Otten
Sourabh Kalal wrote: > how we can access the value from using id.. > like x=10 > id(x) > 3235346364 > > how i can read value 10 using id 3235346364 Use ctypes: $ python3 Python 3.4.3 (default, Nov 17 2016, 01:08:31) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for

Re: How coding in Python is bad for you

2017-01-23 Thread Wildman via Python-list
On Mon, 23 Jan 2017 20:39:26 +, Jon Ribbens wrote: > On 2017-01-23, alister wrote: >> On Tue, 24 Jan 2017 07:19:42 +1100, Chris Angelico wrote: >>> I believe that's "bad for you" in the sense that chocolate is bad for >>> you. >>> >>> It isn't. >> >> chocolate is

[issue29228] sqlite3 OperationalError on changing into WAL transaction mode

2017-01-23 Thread Aviv Palivoda
Aviv Palivoda added the comment: There is also a issue with the docs here. Look at issue 29121. -- nosy: +palaviv ___ Python tracker ___

Re: How coding in Python is bad for you

2017-01-23 Thread Grant Edwards
On 2017-01-23, breamore...@gmail.com wrote: > The article is here http://lenkaspace.net/index.php/blog/show/111 I don't really think any of his points are valid, but one way that programming in Python is bad for you: * It reduces your tolerance for progamming in PHP

Re: How coding in Python is bad for you

2017-01-23 Thread Chris Angelico
On Tue, Jan 24, 2017 at 6:59 AM, Grant Edwards wrote: > On 2017-01-23, breamore...@gmail.com wrote: > >> The article is here http://lenkaspace.net/index.php/blog/show/111 > > I don't really think any of his points are valid, but one way that >

[issue18235] _sysconfigdata.py wrong on AIX installations

2017-01-23 Thread Martin Panter
Martin Panter added the comment: If the assignment is completely removed, won’t this break the test when run from the source or build tree (as opposed to when installed)? Or at least make the situation worse: the AIX buildbot is already failing test_distutils, but at least it is looking for

[issue29152] unittest subTest does not call addFailure

2017-01-23 Thread Martin Panter
Martin Panter added the comment: It is not obvious what the effect of not calling addFailure() is, but perhaps this is related to Issue 25894? Failure and error statuses are not immediately reported from subtests. -- nosy: +martin.panter ___ Python

[issue29343] sock.close() raises OSError EBADF when socket's fd is closed

2017-01-23 Thread Charles-François Natali
Charles-François Natali added the comment: FWIW I agree with Antoine and Martin: ignoring EBADF is a bad idea, quite dangerous. The man page probably says this to highlight that users shouldn't *retry* close(): """ Retrying the close() after a failure return is the wrong thing to do,

[issue29339] Interactive: Move to same indentation level as previous line

2017-01-23 Thread 12345 67890
12345 67890 added the comment: In addition, windows allows direct console control via the win32 API and the code for that isn't too lengthy. -- ___ Python tracker

[issue29339] Interactive: Move to same indentation level as previous line

2017-01-23 Thread Brett Cannon
Brett Cannon added the comment: No, I don't think you were rude, 12345 67890. I was just giving the standard explanation as some people are not pleasant and you never know who might read this issue later and benefit from the reminder. -- ___ Python

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Michael Torrie
On 01/23/2017 10:49 AM, Sourabh Kalal wrote: > how we can access the value from using id.. > like x=10 > id(x) > 3235346364 > > how i can read value 10 using id 3235346364 Many objects in python such as numbers like 10 or strings are immutable; they can never be altered once called into

[issue29339] Interactive: Move to same indentation level as previous line

2017-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Adding at least 'dumb indentation' (repeat last indent) to the REPL would make it at least a bit more usable. (This still would not be a good as an IDE, like IDLE, that does smarter indentation, such as adding an additional indent after a compound statement

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Chris Angelico
On Tue, Jan 24, 2017 at 7:26 AM, Skip Montanaro wrote: > On Mon, Jan 23, 2017 at 2:17 PM, Chris Angelico wrote: >>> There. *Now* you have an address. Hack to your heart's content. >> >> No, you now have a hexadecimal representation of an integer. > >

[issue18235] _sysconfigdata.py wrong on AIX installations

2017-01-23 Thread David Edelsohn
David Edelsohn added the comment: I completely agree with Martin's concern. As I expressed before, this needs to work in three contexts: 1) Building modules in the tree during the build process. 2) In-tree testing of build module feature (test_distutils). 3) Building and installing modules

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread breamoreboy
On Monday, January 23, 2017 at 5:59:42 PM UTC, Sourabh Kalal wrote: > how we can access the value from using id.. > like x=10 > id(x) > 3235346364 > > how i can read value 10 using id 3235346364 What are you trying to achieve here? If you'd explain that rather than how you're trying to achieve

[issue18235] _sysconfigdata.py wrong on AIX installations

2017-01-23 Thread Michael Felt
Michael Felt added the comment: You guys are the experts. I can only comment on what I see. IMHO: the file _sysconfigdata.py is more accurate with nothing in it. I am clearly confused by whatever process this is. If you believe it is more accurate to have the BLD variable 'inaccurate' in this

[issue29353] Incorrect handling of HTTP response with "Content-Type: message/rfc822" header

2017-01-23 Thread R. David Murray
R. David Murray added the comment: IMO http *should* be using headersonly=True, so while I haven't looked into this issue the solution seems plausible to me. I'm not entirely sure why it is considered a backward-compatibility hack, but I don't see any likelyhood that the headersonly API will

Re: How coding in Python is bad for you

2017-01-23 Thread Michael Torrie
On 01/23/2017 10:34 AM, Chris Angelico wrote: > I would respond point-by-point if I thought the author had a clue. Yeah a pretty bizarre, flame-bait blog post. Glad I use an ad-blocker as a matter of course. I'm uncertain as to why Mark chose to post that particular little gem to the list. It's

Re: How coding in Python is bad for you

2017-01-23 Thread Albert-Jan Roskam
sola dosis facit venenum ~ Paracelsus (1493-1541) From: Python-list on behalf of alister Sent: Monday, January 23, 2017 8:32:49 PM To: python-list@python.org Subject: Re: How

[issue29339] Interactive: Move to same indentation level as previous line

2017-01-23 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Thanks for the standard explanation, Brett. I was just following the devguide too strictly and assumed python-ideas is the first place one should go :-). As for the idea, it seems others wish/wished it too (first paragraph:

Re: How coding in Python is bad for you

2017-01-23 Thread Adam M
On Monday, January 23, 2017 at 3:41:17 PM UTC-5, Jon Ribbens wrote: > On 2017-01-23, alister wrote: > > On Tue, 24 Jan 2017 07:19:42 +1100, Chris Angelico wrote: > >> I believe that's "bad for you" in the sense that chocolate is bad for > >> you. > >> > >> It isn't. > > >

Re: How coding in Python is bad for you

2017-01-23 Thread Ethan Furman
On 01/23/2017 01:55 PM, BartC wrote: On 23/01/2017 17:34, Chris Angelico wrote: On Tue, Jan 24, 2017 at 4:24 AM, breamoreboy wrote: The article is here http://lenkaspace.net/index.php/blog/show/111 I would respond point-by-point if I thought the author had a clue. I thought points 1 to 4

Re: How coding in Python is bad for you

2017-01-23 Thread alister
On Tue, 24 Jan 2017 07:19:42 +1100, Chris Angelico wrote: > On Tue, Jan 24, 2017 at 6:59 AM, Grant Edwards > wrote: >> On 2017-01-23, breamore...@gmail.com wrote: >> >>> The article is here http://lenkaspace.net/index.php/blog/show/111 >> >> I

Re: How coding in Python is bad for you

2017-01-23 Thread Chris Angelico
On Tue, Jan 24, 2017 at 8:04 AM, Adam M wrote: > On Monday, January 23, 2017 at 3:41:17 PM UTC-5, Jon Ribbens wrote: >> On 2017-01-23, alister wrote: >> > On Tue, 24 Jan 2017 07:19:42 +1100, Chris Angelico wrote: >> >> I believe that's "bad for

String Replacement

2017-01-23 Thread subhabangalore
I have a string like "Trump is $ the president of USA % Obama was $ the president of USA % Putin is $ the premier of Russia%" Here, I want to extract the portions from $...%, which would be "the president of USA", "the president of USA", "the premier of Russia" and would work some post

Re: How coding in Python is bad for you

2017-01-23 Thread BartC
On 23/01/2017 17:34, Chris Angelico wrote: On Tue, Jan 24, 2017 at 4:24 AM, wrote: The article is here http://lenkaspace.net/index.php/blog/show/111 I would respond point-by-point if I thought the author had a clue. I thought points 1 to 4 were valid, in that the

Re: How to create a socket.socket() object from a socket fd?

2017-01-23 Thread Ethan Furman
On 01/23/2017 09:00 AM, Grant Edwards wrote: On 2017-01-23, Antoon Pardon wrote: The standard response to issues like this is: A foolish consistency is the hobgoblin of little minds And wise consistency is the foundation of a good language design. Otherwise known as: if there's not

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Skip Montanaro
On Mon, Jan 23, 2017 at 2:17 PM, Chris Angelico wrote: >> There. *Now* you have an address. Hack to your heart's content. > > No, you now have a hexadecimal representation of an integer. You missed my attempt at levity, I think. S --

Re: Adding colormaps?

2017-01-23 Thread Albert-Jan Roskam
(sorry for top-posting) I does not appear to be possible in matplolibrc (1). But you can use matplotlib.cm.register_cmap to register new cmaps (2) such as these (3). (Note: I did not try this) (1)http://matplotlib.org/1.4.0/users/customizing.html (2)http://matplotlib.org/api/cm_api.html

[issue29339] Interactive: Move to same indentation level as previous line

2017-01-23 Thread 12345 67890
12345 67890 added the comment: It probably won't be trivial, but it definitely is possible. Suplemon has the exact functionality needed and it's only dependency is CPython. The only question is: how much code is this going to add? [1]: https://github.com/richrd/suplemon --

Re: Adding colormaps?

2017-01-23 Thread Martin Schöön
Den 2017-01-23 skrev blue : > you have here a full example , for another version not significant changes: > http://matplotlib.org/examples/color/colormaps_reference.html Thanks but this only shows how to use it once you have it. When I run this code I get an error message

Re: How coding in Python is bad for you

2017-01-23 Thread Jon Ribbens
On 2017-01-23, alister wrote: > On Tue, 24 Jan 2017 07:19:42 +1100, Chris Angelico wrote: >> I believe that's "bad for you" in the sense that chocolate is bad for >> you. >> >> It isn't. > > chocolate is a poison (lethal dose for a human approx 22lb) That's a

[issue29347] Python 2.7.8 is crashing while creating weakref for a given object.

2017-01-23 Thread Saida Dhanavath
Saida Dhanavath added the comment: Hi Christian Heimes, PFA. I have written a some code to simulate and test PyWeakReference struct instantion and then hit segfault based on flag passed-in to C code. Here I am trying to execute some of the operations from new_weakref and dealloc_weakref of

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Chris Angelico
On Tue, Jan 24, 2017 at 6:05 AM, Skip Montanaro wrote: > On Mon, Jan 23, 2017 at 12:49 PM, Chris Angelico wrote: >> >> On Tue, Jan 24, 2017 at 4:49 AM, Sourabh Kalal wrote: >> > how we can access the value from using id.. >> >

[issue29339] Interactive: Move to same indentation level as previous line

2017-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: The point I was trying to get at above is that simply printing a prompt and making the use enter the entire line should work on every console, while anything fancier may not be so reliable. Thinking more, I realize that my patch outline is incomplete. After

Re: How coding in Python is bad for you

2017-01-23 Thread Chris Angelico
On Tue, Jan 24, 2017 at 8:55 AM, BartC wrote: > On 23/01/2017 17:34, Chris Angelico wrote: >> >> On Tue, Jan 24, 2017 at 4:24 AM, wrote: >>> >>> The article is here http://lenkaspace.net/index.php/blog/show/111 >> >> >> I would respond point-by-point if I

[issue28518] execute("begin immediate") throwing OperationalError

2017-01-23 Thread Aviv Palivoda
Aviv Palivoda added the comment: Removed opening a transaction on select. I will argue for that in issue 9924 after this is resolved. -- Added file: http://bugs.python.org/file46397/sqlite-ddl-dml-3.patch ___ Python tracker

Re: How coding in Python is bad for you

2017-01-23 Thread mm0fmf
On 23/01/2017 21:04, Adam M wrote: On Monday, January 23, 2017 at 3:41:17 PM UTC-5, Jon Ribbens wrote: On 2017-01-23, alister wrote: On Tue, 24 Jan 2017 07:19:42 +1100, Chris Angelico wrote: I believe that's "bad for you" in the sense that chocolate is bad for you.

Re: How coding in Python is bad for you

2017-01-23 Thread Tim Daneliuk
On 01/23/2017 02:19 PM, Chris Angelico wrote: > On Tue, Jan 24, 2017 at 6:59 AM, Grant Edwards > wrote: >> On 2017-01-23, breamore...@gmail.com wrote: >> >>> The article is here http://lenkaspace.net/index.php/blog/show/111 >> >> I don't really

  1   2   >