Re: PSA: Debian Stretch, apt-listchanges, and Python 3

2016-08-29 Thread Matt Ruffalo
On 2016-08-29 23:56, Chris Angelico wrote: > Up until very recently, the system Python has only been the Python 2. > (For a while, it wasn't even 2.7, but I could easily use altinstall > for that.) I have deliberately wanted to use 3.6 for ALL testing, not > just by messing with venvs or shell

[issue11734] Add half-float (16-bit) support to struct module

2016-08-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> mark.dickinson ___ Python tracker ___

[issue11734] Add half-float (16-bit) support to struct module

2016-08-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: In the docs for note 7, consider expanding the text to describe what a half-float is (1-bit sign, 10 bit significand, 5 bit exponent) and its allowable range. This wasn't necessary for codes "f" and "d" since they have well-known C equivalents, but in

Re: Multimeter USB output

2016-08-29 Thread Paul Rubin
Larry Hudson writes: >> with BDS-C under CP/M. Somebody remenbering this no-fp compiler from >> the dark age before PC und Linux? > I remember it well. It's what I used to initially learn C. Source code is online here: http://www.bdsoft.com/resources/bdsc.html I've looked at

Re: Multimeter USB output

2016-08-29 Thread Larry Hudson via Python-list
On 08/29/2016 01:54 AM, Joe wrote: [snip...] Interesting, but... The last time I did something with c, it was with BDS-C under CM/M. Somebody remenbering this no-fp compiler from the dark age before PC und Linux? I remember it well. It's what I used to initially learn C. I'm a completely

Re: PSA: Debian Stretch, apt-listchanges, and Python 3

2016-08-29 Thread Chris Angelico
On Tue, Aug 30, 2016 at 11:58 AM, Matt Wheeler wrote: > I think the real PSA is "don't mess with the system python(3) version". > > So you've managed to fix this issue, but what if there are others? I think > packages on Debian have a reasonable right to expect that the version

[issue27879] add os.syncfs()

2016-08-29 Thread Марк Коренберг
Марк Коренберг added the comment: 1. It is appropriate to call `sync()` when one calls `os.syncfs()` if `syncfs()` syscall is not supported in kernel. 2. https://technet.microsoft.com/sv-se/sysinternals/bb897438(en-us).aspx 3. https://github.com/EricGrange/FlushFileCache ? --

[issue21541] Provide configure option --with-ssl for compilation with custom openssl

2016-08-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: We use Modules/Setup.local to build the _ssl and _hashlib modules against our an SSL library of our choosing at work using a Setup entry like this: _ssl _ssl.c $(PY_CORE_CFLAGS) -DUSE_SSL -I%{SSL_ROOT}/include \ -Wl,--version-script,_ssl.lds \

[issue21541] Provide configure option --with-ssl for compilation with custom openssl

2016-08-29 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- versions: +Python 3.6 -Python 3.4 ___ Python tracker ___

[issue24254] Make class definition namespace ordered by default

2016-08-29 Thread Nick Coghlan
Nick Coghlan added the comment: Because we're not making ordered-by-default dicts a language specification level requirement, so portable code can't rely on them. However, the PEP at https://www.python.org/dev/peps/pep-0520/ is deliberately worded so that there's no requirement for the class

[issue27891] Consistently group and sort imports within idlelib modules.

2016-08-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: On 2002 Sept 14, the following was merged into editor.py (then EditorWindow.py) as part of the smart indenting code added to the bottom. import tokenize _tokenize del tokenize This now would usually be written "import tokenize as _tokenize". Stdlib modules

[issue27892] Idlelib: document or move delayed imports

2016-08-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Another good reason for delaying an import is when the import is only needed for testing. In module_x ... def callable_x(parent) # htest # from tkinter import Toplevel box = Toplevel(parent) ... if __name__ == '__main__': from unittest import

[issue27891] Consistently group and sort imports within idlelib modules.

2016-08-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: This issue includes adding the idlelib import coding standard to idlelib.README. The delayed-import issue is #27893. A second followup will be to stop importing tkinter modules 'as' their Py 2 names. Change "from tkinter import font as TkFont" to "from

Re: PSA: Debian Stretch, apt-listchanges, and Python 3

2016-08-29 Thread Matt Wheeler
I think the real PSA is "don't mess with the system python(3) version". On Mon, 29 Aug 2016 at 13:18 Chris Angelico wrote: > If, like me, you build Python 3.6 from source and make it your default > 'python3' binary, you may run into issues with the latest > apt-listchanges,

[issue27889] ctypes interfers with signal handling

2016-08-29 Thread Andre Merzky
Andre Merzky added the comment: Thanks for checking! I use: $ uname -a Linux thinkie 3.11-2-amd64 #1 SMP Debian 3.11.8-1 (2013-11-13) x86_64 GNU/Linux $ python -V Python 2.7.5+ Note that the problem does not occur on every run -- but in more than 50% of the cases, for me. I am on a

[issue27892] Idlelib: document or move delayed imports

2016-08-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- dependencies: +Consistently group and sort imports within idlelib modules. ___ Python tracker ___

[issue27892] Idlelib: document or move delayed imports

2016-08-29 Thread Terry J. Reedy
New submission from Terry J. Reedy: This issue depends and follows-up on #27891, consistently grouping and sorting imports in idlelib files. PEP 8 (also) says 'all imports are put at the top of the file', though the 'consistency hobgloblin' rule allows for exceptions. Possible reasons

[issue27891] Consistently group and sort imports within idlelib modules.

2016-08-29 Thread Terry J. Reedy
New submission from Terry J. Reedy: PEP 8 suggests separately grouping stdlib, dependency, and local package imports. Within idlelib, idlelib imports are treated as local package imports. Tkinter is sometimes treated as a dependency, which makes its imports easy to notice, and I want to do

[issue27350] Compact and ordered dict

2016-08-29 Thread INADA Naoki
Changes by INADA Naoki : Added file: https://bugs.python.org/file44259/compact-dict.patch ___ Python tracker ___

Re: importing down in code rather than at top of file.

2016-08-29 Thread Terry Reedy
On 8/29/2016 1:57 PM, Tobiah wrote: Is it worth while to defer the import of a large module that seldom gets used in the script? import sys import os if hardly_ever_happens(): import large_module large_module.do_task() I imagine it takes a certain amount of

[issue27889] ctypes interfers with signal handling

2016-08-29 Thread Eryk Sun
Eryk Sun added the comment: I can't reproduce this issue in 2.7.11 on Linux. I also don't see how it could be related to ctypes. It doesn't meddle with signal handlers, and neither does Linux libuuid -- not as far I as I can tell with breakpoints set on signal() and sigaction(). Please

[issue27890] platform.release() incorrect in Python 3.5.2 on Windows 2008ServerR2

2016-08-29 Thread James Domingo
New submission from James Domingo: The platform.release() function in Python 3.5.1 returns the correct value on Windows 2008 Server R2: C:\Users\jdoe\Documents\Python>python-3.5.1-embed-amd64\python.exe Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AM

[issue27889] ctypes interfers with signal handling

2016-08-29 Thread Andre Merzky
New submission from Andre Merzky: Summary: A thread uses signals to the MainThread to signal an abnormal condition. The main thread is expected to get that signal, invoke the signal handler, and raise an exception. In combination with 'ctypes' calls, that does not happen. Consider the

Re: importing down in code rather than at top of file.

2016-08-29 Thread Nobody
On Tue, 30 Aug 2016 04:15:05 +1000, Chris Angelico wrote: > Don't imagine; test. Testing alone isn't really good enough. There may be perfectly valid reasons to avoid the import which won't show up in anything less than the most thorough testing imaginable. Personally I wouldn't defer an import

[issue27879] add os.syncfs()

2016-08-29 Thread Josh Rosenberg
Josh Rosenberg added the comment: So syncfs is basically "sync, but only for a single file system corresponding to a given open file"? Given it's Linux only (doesn't look like it's part of any standard that UNIX or BSD OSes would provide), it seems rather special purpose to expose in Python.

Re: Helloworld with Python C extension

2016-08-29 Thread Stefan Behnel
Ganesh Pal schrieb am 29.08.2016 um 19:30: > I need you input on the below hello world program. I a m trying to add a > python binding which will return the character for the given index . I am > on Python 2.7 and linux > > Example : > >>> string ='helloworld' > >>> dda_hello(5) > >>> 'w' >

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

2016-08-29 Thread Christopher Gurnee
Changes by Christopher Gurnee : -- nosy: +gurnec ___ Python tracker ___ ___

[issue24254] Make class definition namespace ordered by default

2016-08-29 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +fijall ___ Python tracker ___ ___

[issue24254] Make class definition namespace ordered by default

2016-08-29 Thread STINNER Victor
STINNER Victor added the comment: Brett Cannon added the comment: > Any update on this? b1 is exactly 2 weeks away at this point. Why do we need changes specific to classes, if dictionaries could be ordered by default? Issue #27350: "Compact and ordered dict" by INADA Naoki --

[issue27888] Hide pip install/uninstall windows in setup

2016-08-29 Thread Steve Dower
Steve Dower added the comment: An almost immediate update - this patch also makes COMPILEALL not pop up a window. -- Added file: https://bugs.python.org/file44258/installer_2.diff ___ Python tracker

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-08-29 Thread Christian Heimes
Christian Heimes added the comment: Awesome! I have removed the surplus functions, made the other additional functions static and fixed minor test issue with LibreSSL and OpenSSL < 1.0.1. My branches on github compile and pass all tests with OpenSSL "0.9.8zc", "0.9.8zh", "1.0.1t", "1.0.2",

[issue27888] Hide pip install/uninstall windows in setup

2016-08-29 Thread Steve Dower
New submission from Steve Dower: The console window for pip that appears during setup prevents us from having a truly silent install. This patch uses the CAQuietExec task from WiX, extracted and checked in directly (the binary blob is omitted from the patch), to run the pip

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-08-29 Thread Zachary Ware
Zachary Ware added the comment: Looks like that took care of it, build succeeded with no new warnings, and test.ssltests passed. -- ___ Python tracker

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-08-29 Thread Christian Heimes
Christian Heimes added the comment: Hi Zachary, you have found a bug in my patch. I mistakenly defined SSL_CTX_set_default_passwd_cb() and SSL_CTX_set_default_passwd_cb_userdata() for OpenSSL < 1.1.0. Both functions already exist. Only the getters are missing for < 1.1.0. Please remove both

[issue24254] Make class definition namespace ordered by default

2016-08-29 Thread Brett Cannon
Brett Cannon added the comment: Any update on this? b1 is exactly 2 weeks away at this point. -- nosy: +brett.cannon ___ Python tracker ___

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-08-29 Thread Zachary Ware
Zachary Ware added the comment: This will require significant updates to PCbuild/prepare_ssl.py and/or the way we build OpenSSL on Windows before we can even properly test this on Windows. I don't think that should hold up acceptance of the rest of the patch (provided 1.0.2 support remains

[issue27427] Add new math module tests

2016-08-29 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___

[issue27870] Left shift of zero allocates memory

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed for 2.7 and 3.6. Closing. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue27870] Left shift of zero allocates memory

2016-08-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 58ea646ef657 by Mark Dickinson in branch '2.7': Issue #27870: A left shift of zero by a large integer no longer attempts to allocate large amounts of memory. https://hg.python.org/cpython/rev/58ea646ef657 --

[issue27870] Left shift of zero allocates memory

2016-08-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 09fa42818cf8 by Mark Dickinson in branch 'default': Issue #27870: A left shift of zero by a large integer no longer attempts to allocate large amounts of memory. https://hg.python.org/cpython/rev/09fa42818cf8 -- nosy: +python-dev

Re: importing down in code rather than at top of file.

2016-08-29 Thread alister
On Mon, 29 Aug 2016 10:57:22 -0700, Tobiah wrote: > Is it worth while to defer the import of a large module that seldom > gets used in the script? > > > import sys import os > > if hardly_ever_happens(): > > import large_module large_module.do_task() >

Re: importing down in code rather than at top of file.

2016-08-29 Thread Chris Angelico
On Tue, Aug 30, 2016 at 3:57 AM, Tobiah wrote: > Is it worth while to defer the import of a large module that seldom > gets used in the script? > > > import sys > import os > > if hardly_ever_happens(): > > import large_module >

importing down in code rather than at top of file.

2016-08-29 Thread Tobiah
Is it worth while to defer the import of a large module that seldom gets used in the script? import sys import os if hardly_ever_happens(): import large_module large_module.do_task() I imagine it takes a certain

[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-08-29 Thread Matthias Klose
Matthias Klose added the comment: now fixed. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-08-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c77488830bc by doko in branch 'default': - Issue #23968, keep platform_triplet and multiarch macros in sync https://hg.python.org/cpython/rev/5c77488830bc -- ___ Python tracker

Re: Helloworld with Python C extension

2016-08-29 Thread MRAB
On 2016-08-29 18:30, Ganesh Pal wrote: Hello Team , I need you input on the below hello world program. I a m trying to add a python binding which will return the character for the given index . I am on Python 2.7 and linux Example : string ='helloworld' dda_hello(5) 'w' /* + * Hello

[issue26040] Improve coverage and rigour of test.test_math

2016-08-29 Thread Jeff Allen
Jeff Allen added the comment: Ah, cunning: I can make sense of it in hex. >>> hex(to_ulps(expected)) '0x3ff0' >>> hex(to_ulps(got)) '0x3fec' >>> hex( to_ulps(got) - to_ulps(expected) ) '-0x4' ... and what you've done with ulp then follows. In my version a format like

Re: Helloworld with Python C extension

2016-08-29 Thread Chris Angelico
On Tue, Aug 30, 2016 at 3:30 AM, Ganesh Pal wrote: > +char dda_hello(int i) > + { > + return string[i]; > + } > + > + return Py_BuildValue("s",char1); Py_BuildValue with an "s" expects a C string - that is, a pointer to char, not just a single character.

Helloworld with Python C extension

2016-08-29 Thread Ganesh Pal
Hello Team , I need you input on the below hello world program. I a m trying to add a python binding which will return the character for the given index . I am on Python 2.7 and linux Example : >> string ='helloworld' >>dda_hello(5) >> 'w' /* + * Hello world example for python bindings

[issue27870] Left shift of zero allocates memory

2016-08-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- stage: -> commit review ___ Python tracker ___ ___

Re: Multimeter USB output

2016-08-29 Thread Rob Gaddi
Joe wrote: > The UT61B has two interfaces, a RS232C interface and this usb interface. > The RS232 interface works well with PySerial. It continously transmits 2 > .. 3 Pakets per second with 14 Bytes each. This happens unsolicited > without any command as long as the RS232C/USB button on the

How to get Read the Docs to generate py-modindex.html?

2016-08-29 Thread Charles Ross
Since I appear to be experiencing one of the few times that Stack Overflow hasn’t provided any quick answers to a problem (http://stackoverflow.com/questions/39197037/how-to-get-read-the-docs-to-generate-py-modindex-html

[issue26040] Improve coverage and rigour of test.test_math

2016-08-29 Thread Jeff Allen
Jeff Allen added the comment: Mark: Thanks for doing my homework. Points 1 and 3 I can readily agree with. I must take another look at to_ulps() with your patch on locally. I used the approach I did because I thought it was incorrect in exactly those corners where you prefer it. I'll take a

[issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: Closing. The docs are correct for the corresponding version of Python: math.log2 is new in Python 3.3, and the entry for math.log2 is there in Python 3.3 but not Python 3.2 or Python 2.7. @PyRW: It looks as though this is simply a version mismatch (looking at

[issue11734] Add half-float (16-bit) support to struct module

2016-08-29 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: mark.dickinson -> ___ Python tracker ___ ___

[issue25402] More accurate estimation of the number of digits in int to decimal string conversion

2016-08-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1902e1d79e25 by Mark Dickinson in branch 'default': Issue #25402: in int-to-decimal-string conversion, reduce intermediate storage requirements and relax restriction on converting large integers. Patch by Serhiy Storchaka.

[issue25402] More accurate estimation of the number of digits in int to decimal string conversion

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: Patch and analysis LGTM. Thanks! -- assignee: -> mark.dickinson resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: Magic UTF-8/Windows-1252 encodings

2016-08-29 Thread Chris Angelico
On Tue, Aug 30, 2016 at 1:28 AM, Random832 wrote: > On Mon, Aug 29, 2016, at 11:14, Chris Angelico wrote: >> Please don't. :) This is something that belongs in the application; >> it's somewhat hacky, and I don't see any benefit to it going into the >> language. For one

[issue27803] ctypes automatic byref failing on custom classes attributes

2016-08-29 Thread Erwan Le Pape
Erwan Le Pape added the comment: I can confirm Eryk got what I meant. I didn't know if it was meant to work that way or if it was simply something that was overlooked so I thought I'd ask, I will look into the ctypes code to provide a patch sometime this week if I can. Terry, for a working

[issue27214] a potential future bug and an optimization that mostly undermines performance in long_invert

2016-08-29 Thread Oren Milman
Oren Milman added the comment: Thanks for the review, Mark :) -- ___ Python tracker ___ ___ Python-bugs-list

[issue27214] a potential future bug and an optimization that mostly undermines performance in long_invert

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed with the analysis and proposed solution. Thanks! -- assignee: -> mark.dickinson resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27214] a potential future bug and an optimization that mostly undermines performance in long_invert

2016-08-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6e1d38674b17 by Mark Dickinson in branch 'default': Issue #27214: Fix potential bug and remove useless optimization in long_invert. Thanks Oren Milman. https://hg.python.org/cpython/rev/6e1d38674b17 -- nosy: +python-dev

Re: Magic UTF-8/Windows-1252 encodings

2016-08-29 Thread Random832
On Mon, Aug 29, 2016, at 11:14, Chris Angelico wrote: > Please don't. :) This is something that belongs in the application; > it's somewhat hacky, and I don't see any benefit to it going into the > language. For one thing, I could well imagine making the fallback > encoding configurable (it isn't

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> ethan.furman ___ Python tracker ___

Re: Magic UTF-8/Windows-1252 encodings

2016-08-29 Thread Chris Angelico
On Tue, Aug 30, 2016 at 12:38 AM, Random832 wrote: > Directing this to python-list because it's really not on the topic of > the idea being discussed. > > On Mon, Aug 29, 2016, at 05:37, Chris Angelico wrote: >> Suppose I come to python-ideas and say "Hey, the MUD

[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-08-29 Thread Mark Dickinson
Changes by Mark Dickinson : -- stage: -> resolved ___ Python tracker ___ ___

[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: In the absence of a concrete use-case, I'm closing as "wont fix". Without suitable infrastructure (non-IEEE 754 buildbots, for example) and a clear need for this, the effort involved in maintaining CPython on non-IEEE 754 systems far outweighs the benefits.

[issue27870] Left shift of zero allocates memory

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch, breaking out the implementation-specific tests into their own method. (Thanks, Serhiy!) -- Added file: https://bugs.python.org/file44256/lshift_zero_v2.patch ___ Python tracker

Magic UTF-8/Windows-1252 encodings

2016-08-29 Thread Random832
Directing this to python-list because it's really not on the topic of the idea being discussed. On Mon, Aug 29, 2016, at 05:37, Chris Angelico wrote: > Suppose I come to python-ideas and say "Hey, the MUD community would > really benefit from a magic decoder that would use UTF-8 where > possible,

[issue27870] Left shift of zero allocates memory

2016-08-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue27870] Left shift of zero allocates memory

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch against 3.6. I think this probably shouldn't be changed for 3.5, but it may be worth backporting the fix to 2.7. -- keywords: +patch Added file: https://bugs.python.org/file44255/lshift_zero.patch ___

Re: What's the best way to minimize the need of run time checks?

2016-08-29 Thread BartC
On 29/08/2016 15:00, Grant Edwards wrote: On 2016-08-29, Chris Angelico wrote: On Mon, Aug 29, 2016 at 10:13 PM, BartC wrote: In C, you can write this: int x; x = 5; x = "hello"; With certain compilers (eg. gcc) you only get a warning. (And since I

[issue27870] Left shift of zero allocates memory

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: Also applies to 3.x. Working on a fix. -- assignee: -> mark.dickinson versions: +Python 3.5, Python 3.6 ___ Python tracker

Re: What's the best way to minimize the need of run time checks?

2016-08-29 Thread Grant Edwards
On 2016-08-29, Chris Angelico wrote: > On Mon, Aug 29, 2016 at 10:13 PM, BartC wrote: >> In C, you can write this: >> >> int x; >> >> x = 5; >> x = "hello"; >> >> With certain compilers (eg. gcc) you only get a warning. (And since >> I don't show warnings to

Re: freqz -style plot of "window design" FIR?

2016-08-29 Thread Matti Viljamaa
Since I noticed this is better suited to the SciPy Users List, I moved it there: https://mail.scipy.org/pipermail/scipy-user/2016-August/037023.html > On 29 Aug 2016, at 14:34, Matti Viljamaa wrote: > > I’m trying to design an arbitrary frequency response filter as

Nikola 7.8.0 released!

2016-08-29 Thread Roberto Alsina
On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.8.0. It fixes some bugs and adds new features. What is Nikola? Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many popular markup

Re: What's the best way to minimize the need of run time checks?

2016-08-29 Thread Ben Bacarisse
Steve D'Aprano writes: > On Mon, 29 Aug 2016 10:31 pm, Chris Angelico wrote: > >> On Mon, Aug 29, 2016 at 10:13 PM, BartC wrote: >>> In C, you can write this: >>> >>> int x; >>> >>> x = 5; >>> x = "hello"; >>> >>> With certain compilers (eg. gcc)

Re: Is duck-typing misnamed?

2016-08-29 Thread breamoreboy
On Monday, August 29, 2016 at 12:08:26 PM UTC+1, Ben Finney wrote: > Michael Torrie writes: > > > Umm no, she was actually a witch. Which makes the scene even funnier. > > "Fair caught," she says at the end. > > She says [0] “It's a fair cop”, which is using the term “cop” to mean > the arrest

Re: What's the best way to minimize the need of run time checks?

2016-08-29 Thread Chris Angelico
On Mon, Aug 29, 2016 at 10:46 PM, Steve D'Aprano wrote: > On Mon, 29 Aug 2016 10:31 pm, Chris Angelico wrote: > >> On Mon, Aug 29, 2016 at 10:13 PM, BartC wrote: >>> In C, you can write this: >>> >>> int x; >>> >>> x = 5; >>> x = "hello"; >>> >>>

Re: What's the best way to minimize the need of run time checks?

2016-08-29 Thread Christian Gollwitzer
Am 29.08.16 um 14:46 schrieb Steve D'Aprano: On Mon, Aug 29, 2016 at 10:13 PM, BartC wrote: In C, you can write this: int x; x = 5; x = "hello"; Let me see if I've got this straight... Bart's second assignment will allocate a block of memory at least five bytes in

[issue27818] Speed up number format spec parsing

2016-08-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9bddf9e72c96 by Serhiy Storchaka in branch 'default': Issue #27818: Speed up parsing width and precision in format() strings for https://hg.python.org/cpython/rev/9bddf9e72c96 -- nosy: +python-dev ___

[issue23229] add inf, nan, infj, nanj to cmath module

2016-08-29 Thread Mark Dickinson
Changes by Mark Dickinson : -- status: open -> closed ___ Python tracker ___ ___

[issue23229] add inf, nan, infj, nanj to cmath module

2016-08-29 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> fixed stage: commit review -> resolved ___ Python tracker ___

[issue23229] add inf, nan, infj, nanj to cmath module

2016-08-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4b25da63d1d0 by Mark Dickinson in branch 'default': Issue 23229: add cmath.inf, cmath.nan, cmath.infj and cmath.nanj. https://hg.python.org/cpython/rev/4b25da63d1d0 -- nosy: +python-dev ___ Python

[issue27818] Speed up number format spec parsing

2016-08-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I haven't found my old patch and tried to reimplement it. Added new file in stringlib. The original patch speeds up microbenchmarks only on about 4% on my computer (32-bit Linux). This is small, but the patch is simple. Moving some functions to template

Re: What's the best way to minimize the need of run time checks?

2016-08-29 Thread Steve D'Aprano
On Mon, 29 Aug 2016 10:31 pm, Chris Angelico wrote: > On Mon, Aug 29, 2016 at 10:13 PM, BartC wrote: >> In C, you can write this: >> >> int x; >> >> x = 5; >> x = "hello"; >> >> With certain compilers (eg. gcc) you only get a warning. (And since I >> don't show warnings to

[issue26040] Improve coverage and rigour of test.test_math

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: One more version; increased the default ulp_tol to 5 everywhere, and made some minor style fixes in nearby code. -- Added file: https://bugs.python.org/file44254/iss26040_v4.patch ___ Python tracker

Re: What's the best way to minimize the need of run time checks?

2016-08-29 Thread Chris Angelico
On Mon, Aug 29, 2016 at 10:13 PM, BartC wrote: > In C, you can write this: > > int x; > > x = 5; > x = "hello"; > > With certain compilers (eg. gcc) you only get a warning. (And since I don't > show warnings to avoid inundation, that seems to compile fine for me!) That's

[issue26040] Improve coverage and rigour of test.test_math

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: I've reviewed the test_math portion of the patch (which looks good, thank you!), and made a few revisions in iss26040_v3.patch. 1. I've rewritten the ulp() function to use struct. Same behaviour as before, but this way feels safer, since it doesn't rely on

PSA: Debian Stretch, apt-listchanges, and Python 3

2016-08-29 Thread Chris Angelico
If, like me, you build Python 3.6 from source and make it your default 'python3' binary, you may run into issues with the latest apt-listchanges, which has switched to using Python 3. The symptom is an ImportError trying to "import debconf", which is available in dist-packages in the system

Re: What's the best way to minimize the need of run time checks?

2016-08-29 Thread BartC
On 29/08/2016 03:43, Steve D'Aprano wrote: Your question seems to be, what happens if you follow that with an assignment to a different type? x = 5 some_code(x) x = "hello world" Will the type-checker consider that an error ("you're assigning a str to an int") or will it infer that x is the

[issue27861] sqlite3 type confusion and multiple frees

2016-08-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset c046cbb24f98 by Serhiy Storchaka in branch '3.5': Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factory https://hg.python.org/cpython/rev/c046cbb24f98 New changeset 97dbba8a6d4a by Serhiy Storchaka in branch '2.7': Issue #27861:

freqz -style plot of "window design" FIR?

2016-08-29 Thread Matti Viljamaa
I’m trying to design an arbitrary frequency response filter as described here: http://www.dspguide.com/ch17/1.htm The technique is said to result in an impulse response in time domain and later in to a filter kernel. I’ve been using scipy.signal.freqz to

[issue27887] Installation failed

2016-08-29 Thread SilentGhost
Changes by SilentGhost : -- resolution: -> not a bug stage: -> resolved type: -> behavior ___ Python tracker ___

[issue27887] Installation failed

2016-08-29 Thread Aleksandar Petrovic
Changes by Aleksandar Petrovic : -- status: open -> closed ___ Python tracker ___ ___

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-29 Thread John Hagen
John Hagen added the comment: Emanuel, I like your rewording. Uploaded a new patch incorporating it. -- Added file: https://bugs.python.org/file44252/issue27877.johnthagen.02.patch ___ Python tracker

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-29 Thread John Hagen
Changes by John Hagen : Removed file: https://bugs.python.org/file44249/issue27877.johnthagen.01.patch ___ Python tracker ___

Twisted 16.4.0 Release Announcement

2016-08-29 Thread Amber "Hawkie" Brown
On behalf of Twisted Matrix Laboratories, I am honoured to announce the release of Twisted 16.4.0. The highlights of this release are: - twist, a new command line tool for running Twisted plugins, similar to twistd but with a simpler, cleaner interface. - A new interface for Protocols,

[issue27861] sqlite3 type confusion and multiple frees

2016-08-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue26040] Improve coverage and rigour of test.test_math

2016-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: iss26040.patch didn't apply cleanly to master (because of the recent math.tau addition). Here's an updated patch. -- Added file: https://bugs.python.org/file44251/iss26040_v2.patch ___ Python tracker

  1   2   >