[issue28758] UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 74: illegal multibyte sequence

2016-11-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: So, does there appear to be a Python bug to fix or should this be closed? -- ___ Python tracker ___

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-11-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes, I suppose this falls under the general exemption in 2.x for -3 warning changes. On Fri, Nov 25, 2016, at 09:13, Berker Peksag wrote: > > Berker Peksag added the comment: > > Roy's patch looks good to me in general. Benjamin, as the RM of 2.7, do > you

[issue28739] PEP 498: docstrings as f-strings

2016-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: I don't really care that much, but I personally think that it would be more consistent (and a simpler rule) if *no* f-string (not even ones without substitutions) were to be allowed as docstrings. In all other examples that Raymond shows it's the syntactic

[issue28739] PEP 498: docstrings as f-strings

2016-11-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: [TJR] > I think this issue should either be closed as 'not a bug' > or redefined as a doc issue. I concur. FWIW, here are some comparisons. Not allowed: 'Not counted as' + ' a docstring' 'Not a docstring ' * 10 b'Also not a docstring'

[issue28804] file tell() report incorrect file position on Windows (but Linux is OK)

2016-11-25 Thread Martin Panter
Martin Panter added the comment: Is this a duplicate of Issue 26016? -- nosy: +martin.panter ___ Python tracker ___

[issue28804] file tell() report incorrect file position on Windows (but Linux is OK)

2016-11-25 Thread liugang
liugang added the comment: Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> f = open('e:\\1.txt') >>> f.readline() '1\n' >>> f.tell() 340282367000166625996085689099021713410 >>>

[issue28804] file tell() report incorrect file position (Windows, Linux is OK)

2016-11-25 Thread liugang
New submission from liugang: D:\Python35\python.exe "D:\PyCharm Community Edition 2016.3\helpers\pydev\pydevconsole.py" 8871 8872 PyDev console: starting. import sys; print('Python %s on %s' % (sys.version, sys.platform)) sys.path.extend(['C:\\Users\\liugang10\\PycharmProjects\\untitled',

Python turtle: How to change icons

2016-11-25 Thread qrious
Hello All, I would like to change two graphical icons related to turtle graphics using Python: a) One that shows up at the top left corner of the canvas window as in below. I believe this is coming from tk itself. https://s22.postimg.org/tkjaxmh41/image.png b) The icon on the desktop as

[issue28758] UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 74: illegal multibyte sequence

2016-11-25 Thread Steve Dower
Steve Dower added the comment: For something as low level as os.popen you should read bytes and decode them manually with the correct encoding. If you use subprocess.Popen instead you can specify encoding="utf-8" in the call (on 3.6). Unfortunately, it's a very bad idea to rely on the default

Re: Options for stdin and stdout when using pdb debugger

2016-11-25 Thread Jason Friedman
> I would like to use pdb in an application where it isn't possible to use > sys.stdin for input. I've read in the documentation for pdb.Pdb that a file > object can be used instead of sys.stdin. Unfortunately, I'm not clear about > my options for the file object. > > I've looked at rpdb on

[issue28777] Add asyncio.Queue __aiter__, __anext__ methods

2016-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: Also it's not clear that it's a good idea without more thought -- there's no way to end the loop on the producing side. -- ___ Python tracker

[issue28777] Add asyncio.Queue __aiter__, __anext__ methods

2016-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: This should be an upstream PR first (GitHub.com/python/asyncio). Also, too late for 3.6. -- versions: -Python 3.5, Python 3.6 ___ Python tracker

Re: best way to read a huge ascii file.

2016-11-25 Thread Steve D'Aprano
On Sat, 26 Nov 2016 02:17 am, Heli wrote: > Hi, > > I have a huge ascii file(40G) and I have around 100M lines. I read this > file using : > > f=np.loadtxt(os.path.join(dir,myfile),delimiter=None,skiprows=0) [...] > I will need the x,y,z and id arrays later for interpolations. The problem > is

[issue24339] iso6937 encoding missing

2016-11-25 Thread John Helour
John Helour added the comment: @mdk Big thanks for the checker. >Looks like your implementation is missing some codepoints, like "\t": > >>>> >print("\t".encode(encoding='iso6937')) > >[...] >UnicodeError: encoding with 'iso6937'

[issue28788] ConfigParser should be able to write config to a given filename, not only into file object

2016-11-25 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: Feature request: ConfigParser should be able to write config to a given filename, not only into file object -> ConfigParser should be able to write config to a given filename, not only into file object

[issue28777] Add asyncio.Queue __aiter__, __anext__ methods

2016-11-25 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed title: asinc iter queue -> Add asyncio.Queue __aiter__, __anext__ methods versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue28763] Use en-dashes for ranges in docs

2016-11-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: I checked the patch with Rietveld and all the changes are '-' to '--' in numeric ranges in text. LGTM. -- nosy: +terry.reedy stage: -> commit review ___ Python tracker

Re: The Case Against Python 3

2016-11-25 Thread Gregory Ewing
Chris Angelico wrote: but brace-formatting lets you reorder the parameters, so it has flexibility that can be important for i18n. Actually, Python's version of %-formatting lets you reorder the parameters as well. The brace syntax for this is easier to read and write, though, so probably

[issue24339] iso6937 encoding missing

2016-11-25 Thread John Helour
John Helour added the comment: PEP8 compliant, added missing codepoints, utf-8 to \u rewrited -- Added file: http://bugs.python.org/file45647/iso6937.py ___ Python tracker

[issue28758] UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 74: illegal multibyte sequence

2016-11-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't see what this has to do with Python. Perhaps out Windows experts can, or can ask for more info. The last I knew, code page 65001 was buggy, but that is not a Python issue. -- components: +Windows nosy: +paul.moore, steve.dower, terry.reedy,

[issue28625] multiprocessing.Pool.imap swallows exceptions thrown by generators

2016-11-25 Thread Davin Potts
Davin Potts added the comment: Closing this issue -- all further discussion moves to issue28699 -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-25 Thread Davin Potts
Davin Potts added the comment: Closing this issue -- all further discussion moves to issue28699 -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-25 Thread Davin Potts
Davin Potts added the comment: Attaching promised crude tests. -- Added file: http://bugs.python.org/file45646/issue_28699_repro.py ___ Python tracker

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-25 Thread Davin Potts
Davin Potts added the comment: @xiang.zhang: Nice catch -- thank you for pointing out the additional issue that arises when trying to provoke the issue twice in a row. The module attribute `job_counter` helped, in this situation, point out what might have otherwise been overlooked. I didn't

[issue28739] PEP 498: docstrings as f-strings

2016-11-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Much of this discussion seems to duplicate and effectively re-open of #25179, wherein it was decided/accepted that true, non-degenerate, non-trivial, non-constant, f-strings that actually do formatting are not constants and do not and should not become

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

2016-11-25 Thread Big Stone
Big Stone added the comment: rewording of sqlite documentation: http://www.sqlite.org/src/info/a4205a83e4ed977a -- ___ Python tracker ___

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

2016-11-25 Thread Big Stone
Big Stone added the comment: Comment kindly provided by D. Richard Hipp himself: " I don't have a login for the python bug tracker so I cannot comment there. But I think I see the problem. This is as Aviv Polivoda remarks at https://bugs.python.org/issue28518#msg279808 I think this is a

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-11-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PYTHON3WARNINGS looks as Python 3 variant of PYTHONWARNINGS. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue28781] On Installation of 3.5 Python get error message

2016-11-25 Thread Steve Dower
Steve Dower added the comment: I was hoping that Repair wouldn't be an option after doing that cleaning. Maybe try uninstalling through Programs and Features, then run those commands again, go into the places you installed it and delete the files, and then run a fresh install. If you still

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

2016-11-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that allows executing "begin immediate" explicitly with any isolation_level. I don't know what behavior is more preferable. -- Added file: http://bugs.python.org/file45644/sqlite-explicit-begin.patch

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-25 Thread Julien Palard
Julien Palard added the comment: Quoting @martin > * bisect_right(a, x[, lo[, hi]]) -> index > This signature is removed. I think removing it is reasonable, because pydoc > can extract the proper signature from the Arg Clinic metadata. In fact, http://docs.python.org/howto/clinic.html, bullet

[issue8145] Documentation about sqlite3 isolation_level

2016-11-25 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___

Re: NameError

2016-11-25 Thread Cai Gengyang
I can't import it --- keep getting an importerror message. Can you try, let me know if it works and show me the code ? Thanks alot , appreciate it ... On Thu, Nov 24, 2016 at 1:22 PM, Nathan Ernst wrote: > I don't see anything in that output resembling an error, just a

[issue28802] Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for cygwin

2016-11-25 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fix curses module compilation with ncurses6 ___ Python tracker

Re: Anyone needs a graphdb written in Python?

2016-11-25 Thread Amirouche Boubekki
Héllo again, On Tue, Nov 22, 2016 at 9:56 PM Amirouche Boubekki < amirouche.boube...@gmail.com> wrote: > I am working on a graphdb written Python on top of wiredtiger. > > Anyone want to share about the subject about where this could be made > useful? > A bit of context might be helpful. I've

[issue28802] Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for cygwin

2016-11-25 Thread Masayuki Yamamoto
New submission from Masayuki Yamamoto: We're discussing a cause of this issue at #25720. -- nosy: +masamoto ___ Python tracker ___

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-11-25 Thread Berker Peksag
Berker Peksag added the comment: Roy's patch looks good to me in general. Benjamin, as the RM of 2.7, do you have any objections? -- nosy: +benjamin.peterson ___ Python tracker

[issue28733] Show how to use mock_open in modules other that __main__

2016-11-25 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report and for the patch. I think expanding the "Where to patch" [1] section would be better. We can then refer to it from the mock_open() documentation. [1] https://docs.python.org/3.6/library/unittest.mock.html#where-to-patch --

[issue28738] Document SIGBREAK as argument for signal() under Windows.

2016-11-25 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report and for the patch, Wojtek! -- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 ___ Python tracker

[issue28738] Document SIGBREAK as argument for signal() under Windows.

2016-11-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset dddce0f539dd by Berker Peksag in branch '3.5': Issue #28738: Document SIGBREAK as an acceptable value on Windows https://hg.python.org/cpython/rev/dddce0f539dd New changeset 43856eb83dc1 by Berker Peksag in branch '3.6': Issue #28738: Merge from

Re: best way to read a huge ascii file.

2016-11-25 Thread BartC
On 25/11/2016 15:17, Heli wrote: I have a huge ascii file(40G) and I have around 100M lines. I read this file using : f=np.loadtxt(os.path.join(dir,myfile),delimiter=None,skiprows=0) x=f1[:,1] y=f1[:,2] z=f1[:,3] id=f1[:,0] I will need the x,y,z and id arrays later for interpolations. The

Re: A Rebuttal For Python 3

2016-11-25 Thread Ned Batchelder
On Friday, November 25, 2016 at 11:26:09 AM UTC-5, Ned Batchelder wrote: > > --Ned. > against Python 3 is Umm, no idea where that "signature" came from... I am not against Python 3... :) -- https://mail.python.org/mailman/listinfo/python-list

Re: A Rebuttal For Python 3

2016-11-25 Thread Ned Batchelder
On Friday, November 25, 2016 at 3:45:37 AM UTC-5, Rustom Mody wrote: > On Friday, November 25, 2016 at 1:27:18 AM UTC+5:30, bream...@gmail.com wrote: > > https://eev.ee/blog/2016/11/23/a-rebuttal-for-python-3/ is one of > > presumably many responses to the article I posted about under the subject

[issue28795] Misleading stating, that SIGINT handler is installed by default

2016-11-25 Thread Jan Velecký
Jan Velecký added the comment: That's good. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: printing funny symbols within spyder ide

2016-11-25 Thread Nathan Ernst
You're attempting to print out control characters most of which have no visible representation. For "\7", at least if you're running from bash, and not in an IDE, you should get an audible bell. All decimal ordinals below 32 are control You can find a list of the symbols here:

[issue28801] configparser: before_get() method of class Interpolation has positional 'parser' parameter that is not used.

2016-11-25 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28786] Warnings in Misc/NEWS

2016-11-25 Thread SilentGhost
Changes by SilentGhost : -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28689] OpenSSL 1.1.0c test failures

2016-11-25 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Tested this in Fedora Rawhide virtual machine, where the fix for the problematic openssl commit was backported, and now the tests hang at test_poplib. Exception in thread Thread-982: Traceback (most recent call last): File

Re: best way to read a huge ascii file.

2016-11-25 Thread Marko Rauhamaa
Heli : > I have a huge ascii file(40G) and I have around 100M lines. I read this > file using : > > [...] > > The problem is reading the file takes around 80 min while the > interpolation only takes 15 mins. > > I was wondering if there is a more optimized way to read the file

best way to read a huge ascii file.

2016-11-25 Thread Heli
Hi, I have a huge ascii file(40G) and I have around 100M lines. I read this file using : f=np.loadtxt(os.path.join(dir,myfile),delimiter=None,skiprows=0) x=f1[:,1] y=f1[:,2] z=f1[:,3] id=f1[:,0] I will need the x,y,z and id arrays later for interpolations. The problem is reading the file

[issue28803] Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for Cygwin

2016-11-25 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for cygwin ___ Python tracker

[issue28803] Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for Cygwin

2016-11-25 Thread Richard S. Gordon
Changes by Richard S. Gordon : -- components: Build nosy: rigordo priority: normal severity: normal status: open title: Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for Cygwin versions: Python 3.6 ___

[issue28796] FIX warnings in documentation build

2016-11-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset f16f0500b49b by Berker Peksag in branch 'default': Issue #28796: Silence Sphinx warnings https://hg.python.org/cpython/rev/f16f0500b49b -- nosy: +python-dev ___ Python tracker

[issue28796] FIX warnings in documentation build

2016-11-25 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

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

2016-11-25 Thread Aviv Palivoda
Aviv Palivoda added the comment: There are already a few test's that start a transaction explicitly: In dbapi.SqliteOnConflictTests CheckOnConflictRollbackWithExplicitTransaction, CheckOnConflictAbortRaisesWithExplicitTransactions which set ``isolation_level = None``. On the other hand in

Re: Simple Python Quiz To Mark 100th Issue of ImportPython

2016-11-25 Thread Ankur Gupta
On Friday, November 25, 2016 at 6:35:13 PM UTC+5:30, Chris Angelico wrote: > On Fri, Nov 25, 2016 at 11:21 PM, Ankur Gupta wrote: > > Hey ChrisA, > > > > I see merit in what you are saying. I should probably have used an example > > with multiple statements perhaps to

[issue28802] Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for cygwin

2016-11-25 Thread Richard s. Gordon
Changes by Richard s. Gordon : -- nosy: eclectic9509 priority: normal severity: normal status: open title: Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for cygwin ___ Python tracker

[issue28793] Copy-paste error in collections.abc docs for AsyncGenerator

2016-11-25 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- assignee: -> docs@python components: +Documentation nosy: +berker.peksag, docs@python resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue28793] Copy-paste error in collections.abc docs for AsyncGenerator

2016-11-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 078c037b1571 by Berker Peksag in branch '3.6': Issue #28793: Fix c/p error in AsyncGenerator documentation https://hg.python.org/cpython/rev/078c037b1571 New changeset 0bf7c2d99bf1 by Berker Peksag in branch 'default': Issue #28793: Merge from 3.6

[issue28673] pyro4 with more than 15 threads often crashes 2.7.12

2016-11-25 Thread STINNER Victor
STINNER Victor added the comment: > I suggest thread_PyThread_start_new_thread() raise RuntimeError("can't start > thread: finalizing") Where *exactly*? Py_FinalizeEx() first calls wait_for_thread_shutdown() and *then* sets _Py_Finalizing to tstate. Does wait_for_thread_shutdown() complete on

[issue28800] Add RETURN_NONE bytecode instruction

2016-11-25 Thread STINNER Victor
STINNER Victor added the comment: > Do you want to add RETURN_NONE or RETURN_CONST? Or both? Only RETURN_NONE because on some corner cases it allow to avoid completely the None constant from code.co_consts and reduce the stack size. I'm not sure that I want to start taking the same road of

[issue28800] Add RETURN_NONE bytecode instruction

2016-11-25 Thread STINNER Victor
STINNER Victor added the comment: Results of performance 0.5.0 on speed-python: haypo@speed-python$ python3 -m perf compare_to -G --min-speed=3 2016-11-23_19-34-default-3d660ed2a60e.json patch.json Slower (3): - spectral_norm: 265 ms +- 2 ms -> 277 ms +- 7 ms: 1.04x slower -

[issue28673] pyro4 with more than 15 threads often crashes 2.7.12

2016-11-25 Thread INADA Naoki
INADA Naoki added the comment: This script can cause deadlock on Python 3.6. 1. Other threads can register traceback to sys module after sys module dict is cleaned up. 2. In Py_Finalize, __del__ method of arbitrary object in the traceback can be called. 3. The __del__ method calls

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-25 Thread Martin Panter
Martin Panter added the comment: Taking the first function, bisect_right(), as an example, I see these differences: * bisect_right(a, x[, lo[, hi]]) -> index This signature is removed. I think removing it is reasonable, because pydoc can extract the proper signature from the Arg Clinic

[issue8145] Documentation about sqlite3 isolation_level

2016-11-25 Thread Florian Schulze
Florian Schulze added the comment: The documentation patch is a definite improvement. -- nosy: +fschulze ___ Python tracker ___

[issue28801] configparser: before_get() method of class Interpolation has positional 'parser' parameter that is not used.

2016-11-25 Thread Wolfgang Maier
Wolfgang Maier added the comment: > Ah. Something like self._interpolation.before_get(self, section, option, > value, d) could be better written as > self._interpolation.before_get(parser=self, ...) Yep, that's roughly what I was trying to explain. > I still don't grock the apparent 'get()'

[issue28785] Clarify the behavior of NotImplemented

2016-11-25 Thread Martin Panter
Martin Panter added the comment: Correct, I meant to say the first fallback is the other call. BTW your suggested text might hold for __eq__(), but for __ne__(), returning NotImplemented seems to bypass the “not a.__eq__(b)” fallback. -- ___ Python

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-25 Thread STINNER Victor
STINNER Victor added the comment: Martin: "Victor, what changes to the doc strings are you talking about?" See attached check_bisect_doc.py script. Before: --- === bisect_right === bisect_right(a, x[, lo[, hi]]) -> index Return the index where to insert item x in list a, assuming a is sorted.

Re: Simple Python Quiz To Mark 100th Issue of ImportPython

2016-11-25 Thread Chris Angelico
On Fri, Nov 25, 2016 at 11:21 PM, Ankur Gupta wrote: > Hey ChrisA, > > I see merit in what you are saying. I should probably have used an example > with multiple statements perhaps to draw a better distinction. My bad. > > Quiz is now out so would be unfair for those who

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-25 Thread Martin Panter
Martin Panter added the comment: Victor, what changes to the doc strings are you talking about? Adding descriptions of the parameters, maybe? Other than that they look very similar to me. I haven’t looked closely, but the Python doc strings have been updated at least once more than the C doc

[issue28801] configparser: before_get() method of class Interpolation has positional 'parser' parameter that is not used.

2016-11-25 Thread Richard Prosser
Richard Prosser added the comment: Ah. Something like self._interpolation.before_get(self, section, option, value, d) could be better written as self._interpolation.before_get(parser=self, ...) - but that would require keyword arguments to be used throughout. I still don't grock the apparent

Re: Immutability of Floats, Ints and Strings in Python

2016-11-25 Thread Steve D'Aprano
On Fri, 25 Nov 2016 10:37 pm, Ned Batchelder wrote: > And: floats are rarely checked for equality, and very very very rarely > used as dict keys, so there's no gain by short-circuiting the equality > check. You cannot short-circuit the equality check, at least not without giving up IEEE-754

[issue8145] Documentation about sqlite3 isolation_level

2016-11-25 Thread Berker Peksag
Berker Peksag added the comment: The patch needs to be updated to address changes in issue 10740 so I'm moving the stage field back to 'patch review'. -- stage: commit review -> patch review versions: +Python 3.7 ___ Python tracker

Re: Immutability of Floats, Ints and Strings in Python

2016-11-25 Thread Ned Batchelder
On Friday, November 25, 2016 at 7:17:08 AM UTC-5, BartC wrote: > On 25/11/2016 11:24, Nikunj wrote: > > > > Out of curiosity, I wanted to understand the reason behind having different > > memory location for two identical floats . This is unlike ints or strings. > > Tried googling but couldn't

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

2016-11-25 Thread Berker Peksag
Berker Peksag added the comment: There is a patch in issue 8145 to improve that part of the documentation. It would be great if you could take a look at it :) -- ___ Python tracker

[issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function

2016-11-25 Thread STINNER Victor
STINNER Victor added the comment: I guess that the main question is if all platforms supported by Python do support intmax_t? -- ___ Python tracker ___

[issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function

2016-11-25 Thread STINNER Victor
STINNER Victor added the comment: intmax_t-4.patch is a single combined patch for Mercurial. To see individual changes, see the GitHub pull request: https://github.com/python/cpython/pull/46/commits -- ___ Python tracker

[issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function

2016-11-25 Thread STINNER Victor
STINNER Victor added the comment: New attempt to support C intmax_t type, since Python 3.6 now supports a subset of C99: intmax_t-4.patch. Changes: Add support for C intmax_t type: Add new conversions functions for PyLong: PyLong_FromIntMax() PyLong_FromUIntMax()

[issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function

2016-11-25 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue28801] configparser: before_get() method of class Interpolation has positional 'parser' parameter that is not used.

2016-11-25 Thread Richard Prosser
Richard Prosser added the comment: Thanks for the prompt reply. I still don't fully understand yet but there aren't any errors reported so I presume that it is OK. There is another related matter however: PyCharm (2016.2.3) indicates that a get() method signature does not match that of the

Re: Simple Python Quiz To Mark 100th Issue of ImportPython

2016-11-25 Thread Ankur Gupta
On Friday, November 25, 2016 at 3:22:30 PM UTC+5:30, Chris Angelico wrote: > On Fri, Nov 25, 2016 at 8:02 PM, Ankur Gupta wrote: > > Import Python Newsletter completed 2 years and 100 issues. Have a simple > > fun python quiz http://importpython.com/newsletter/quiz/ to

Re: Immutability of Floats, Ints and Strings in Python

2016-11-25 Thread BartC
On 25/11/2016 11:24, Nikunj wrote: Out of curiosity, I wanted to understand the reason behind having different memory location for two identical floats . This is unlike ints or strings. Tried googling but couldn't find anything concrete. Any links or references would be appreciated! Do you

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

2016-11-25 Thread Florian Schulze
Florian Schulze added the comment: Ok, I reread https://docs.python.org/3/library/sqlite3.html#controlling-transactions several times now. I think it's confusing. I want explicit transaction handling, but ``isolation_level = None`` turns on "autocommit mode". Unfortunately I don't have

Re: Immutability of Floats, Ints and Strings in Python

2016-11-25 Thread Ned Batchelder
On Friday, November 25, 2016 at 6:34:00 AM UTC-5, Ned Batchelder wrote: > On Friday, November 25, 2016 at 6:24:47 AM UTC-5, Nikunj wrote: > > Hi All, > > > > Out of curiosity, I wanted to understand the reason behind having different > > memory location for two identical floats . This is unlike

Re: The Case Against Python 3

2016-11-25 Thread Chris Warrick
On 25 November 2016 at 12:11, Fabien wrote: > I'd be interested to read what the community thinks about the fact that his > book (learn the hard way) is extremely influential among beginners, and what > tools do we have to avoid that beginners stumble across such

Re: Immutability of Floats, Ints and Strings in Python

2016-11-25 Thread Ned Batchelder
On Friday, November 25, 2016 at 6:24:47 AM UTC-5, Nikunj wrote: > Hi All, > > Out of curiosity, I wanted to understand the reason behind having different > memory location for two identical floats . This is unlike ints or strings. > Tried googling but couldn't find anything concrete. Any links

[issue22298] Lib/warnings.py _show_warning does not protect against being called with a file like object which is closed

2016-11-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: In 3.6, the code in question is def _showwarnmsg_impl(msg): file = msg.file if file is None: file = sys.stderr if file is None: # sys.stderr is None when run with pythonw.exe: # warnings get lost

Immutability of Floats, Ints and Strings in Python

2016-11-25 Thread Nikunj
Hi All, Out of curiosity, I wanted to understand the reason behind having different memory location for two identical floats . This is unlike ints or strings. Tried googling but couldn't find anything concrete. Any links or references would be appreciated! Example: For FLOATS: ==

Re: Help with two issues, buttons and second class object

2016-11-25 Thread Peter Otten
Thomas Grops via Python-list wrote: > Also I am struggling to understand: > >def move_tank(self, dx, dy): > self.x += dx > self.y += dy > self.canvas.move(self.id, dx, dy) > > Where does the dx and dy values get input? To find the place where the move_tank() method

[issue28800] Add RETURN_NONE bytecode instruction

2016-11-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you want to add RETURN_NONE or RETURN_CONST? Or both? Adding new special opcodes can decrease the size of the code and increase performance of some cases. But it adds maintenance burden, increases the complexity of the compiler and peephole optimizer,

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

2016-11-25 Thread Berker Peksag
Berker Peksag added the comment: I haven't had a time to investigate this yet, but I don't think there is an issue with SQLite itself. Note that pysqlite behaves the same way since version 2.8.0 and I couldn't find a similar report in their issue tracker. Like Serhiy, I'm also a little

[issue28801] configparser: before_get() method of class Interpolation has positional 'parser' parameter that is not used.

2016-11-25 Thread Wolfgang Maier
Wolfgang Maier added the comment: Ah, that's kind of confusing at first! the 'self' in the method calls (like on line 796) refers to the ConfigParser instance and will be bound to the parser parameter. The first parameter, the 'self' in the interpolation method definition, is not provided as

Re: The Case Against Python 3

2016-11-25 Thread Fabien
On 11/25/2016 09:29 AM, Mark Summerfield wrote: On Thursday, November 24, 2016 at 7:35:03 PM UTC, bream...@gmail.com wrote: > It's all here https://learnpythonthehardway.org/book/nopython3.html I think the article is full of factual errors and is at best misleading > and at worst downright

[issue28800] Add RETURN_NONE bytecode instruction

2016-11-25 Thread STINNER Victor
STINNER Victor added the comment: I'm proposing this patch because I noticed that reducing the number of opcodes makes Python faster in my old registervm project: a fork of CPython which uses a register-based bytecode: http://faster-cpython.readthedocs.io/registervm.html I also plan to

[issue22298] Lib/warnings.py _show_warning does not protect against being called with a file like object which is closed

2016-11-25 Thread Julius Lehmann-Richter
Julius Lehmann-Richter added the comment: Hey Wolfgang, thank you for the clarification. I would never write such code of course, I stumbled across this with a third-party program. I understand your point of view and I actually agree. I would not have even opened this report if it had not

Re: Help with two issues, buttons and second class object

2016-11-25 Thread Peter Otten
Thomas Grops via Python-list wrote: > Peter, in your code what does that self.root = root mean in the __init__ > function of the class In your original script you used global variables to access the tkinter.Tk() object and the canvas. A simplified example: import tkinter class Tank: def

[issue28800] Add RETURN_NONE bytecode instruction

2016-11-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core nosy: +rhettinger stage: -> patch review type: -> enhancement ___ Python tracker

[issue28801] configparser: before_get() method of class Interpolation has positional 'parser' parameter that is not used.

2016-11-25 Thread Richard Prosser
New submission from Richard Prosser: >From https://hg.python.org/cpython/file/3.5/Lib/configparser.py (for example): 358class Interpolation: 359"""Dummy interpolation that passes the value through with no changes.""" 360 361def before_get(self, parser, section, option, value, defaults):

[issue28800] Add RETURN_NONE

2016-11-25 Thread STINNER Victor
New submission from STINNER Victor: Attached patch adds a new bytecode instruction: RETURN_NONE. It is similar to "LOAD_CONST; RETURN_VALUE" but it avoids the need of adding None to constants of the code object. For function with an empty body, it reduces the stack size from 1 to 0. Example

Cohabitation of debug and release python in the same folder

2016-11-25 Thread Olivier Barthelemy
If i try to build a normal python and a 'with-pydebug' python in the same folder, I can run both versions of python by running the real executable names instead of the generic name symlinks. However, if i want to use sysconfig.get_config_var() to check "Py_DEBUG" (to then know from .py files

  1   2   >