Re: [Python-Dev] Issue #25256: Add sys.debug_build?

2015-10-02 Thread Victor Stinner
2015-10-02 9:37 GMT+02:00 Nick Coghlan : > Spell it as "sys.implementation.debug_build" and I'm in favour. Oh, in fact, I don't have no preference between sys.debug_flag and sys.implementation.debug_flag. If I understood correctly, Serhiy would prefer

Re: [Python-Dev] Issue #25256: Add sys.debug_build?

2015-10-02 Thread Maciej Fijalkowski
Speaking of other python implementations - why would you even care? (the pypy debug build has very different properties and does very different stuff for example). I would be very happy to have this clearly marked as implementation-dependent and that's why it would be cool to not be in sys (there

Re: [Python-Dev] Issue #25256: Add sys.debug_build?

2015-10-02 Thread Barry Warsaw
On Oct 02, 2015, at 11:46 AM, Victor Stinner wrote: >Should I write a PEP for a new field in sys.implementation? Specifically PEP 421 says that a PEP is needed if the new sys.implementation attribute is required to be defined in all implementations, i.e. it's a new required attribute. Will

Re: [Python-Dev] Issue #25256: Add sys.debug_build?

2015-10-02 Thread Victor Stinner
2015-10-02 13:16 GMT+02:00 Nir Soffer : > Whats wrong with: > sysconfig.get_config_var('Py_DEBUG') > 0 Again, refer to my first message "On the Internet, I found various recipes to check if Python is compiled is debug mode. Sadly, some of them are not portable." I don't

Re: [Python-Dev] Issue #25256: Add sys.debug_build?

2015-10-02 Thread Nir Soffer
Whats wrong with: >>> sysconfig.get_config_var('Py_DEBUG') 0 Nir On Fri, Oct 2, 2015 at 10:18 AM, Victor Stinner wrote: > Hi, > > I created the issue "Add sys.debug_build public variable to check if > Python was compiled in debug mode":

Re: [Python-Dev] Issue #25256: Add sys.debug_build?

2015-10-02 Thread Serhiy Storchaka
On 02.10.15 10:18, Victor Stinner wrote: I would like to add an obvious way to check if Python was compiled in debug mode, instead of having hacks/tips to check it. On the Internet, I found various recipes to check if Python is compiled is debug mode. Sadly, some of them are not portable. I

[Python-Dev] Issue #25256: Add sys.debug_build?

2015-10-02 Thread Victor Stinner
Hi, I created the issue "Add sys.debug_build public variable to check if Python was compiled in debug mode": http://bugs.python.org/issue25256 I would like to add an obvious way to check if Python was compiled in debug mode, instead of having hacks/tips to check it. On the Internet, I found

Re: [Python-Dev] Issue #25256: Add sys.debug_build?

2015-10-02 Thread Nick Coghlan
On 2 October 2015 at 17:18, Victor Stinner wrote: > What do you think? Should we add sys.debug_build? Spell it as "sys.implementation.debug_build" and I'm in favour. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia