Re: Copying a compiled Python from one system to another

2016-10-01 Thread Paul Rubin
Steve D'Aprano writes: > Yes, this. You need gcc 4.8 or better to build CPython 3.6, and the most > recent any of my systems support is 4.4. Building gcc takes a while but it's reasonably simple. Just start it going and read a book for a while. --

[issue28183] Clean up and speed up dict iteration

2016-10-01 Thread INADA Naoki
INADA Naoki added the comment: dict_iter8.patch is based on dict_iter3.patch. Added some comments and fixing indents. No change about _PyDict_Next API. -- Added file: http://bugs.python.org/file44921/dict_iter8.patch ___ Python tracker

[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2016-10-01 Thread Zachary Ware
Zachary Ware added the comment: For future reference, having a patch attached to the issue does not mean the issue is fixed, and it should not be closed. -- nosy: +zach.ware stage: -> resolved type: -> compile error versions: +Python 3.7 -Python 3.4

Re: inplace text filter - without writing file

2016-10-01 Thread Sayth Renshaw
On Sunday, 2 October 2016 16:19:14 UTC+11, Sayth Renshaw wrote: > On Sunday, 2 October 2016 12:14:43 UTC+11, MRAB wrote: > > On 2016-10-02 01:21, Sayth Renshaw wrote: > > > Hi > > > > > > I have a fileobject which was fine however now I want to delete a line > > > from the file object before

[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3bde312ae936 by Zachary Ware in branch 'default': Issue #21124: Fix building _struct on Cygwin. https://hg.python.org/cpython/rev/3bde312ae936 -- nosy: +python-dev ___ Python tracker

Re: inplace text filter - without writing file

2016-10-01 Thread Sayth Renshaw
On Sunday, 2 October 2016 12:14:43 UTC+11, MRAB wrote: > On 2016-10-02 01:21, Sayth Renshaw wrote: > > Hi > > > > I have a fileobject which was fine however now I want to delete a line from > > the file object before yielding. > > > > def return_files(file_list): > > for filename in

[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2016-10-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: > The newly-added statistics.geometric_mean function appears to have no > tests at all That's weird and unfortunate. I certainly wrote tests, and I have a backup of them. I have no idea what happened. Attached is a patch that adds the tests, but obviously I

Re: unintuitive for-loop behavior

2016-10-01 Thread Chris Angelico
On Sun, Oct 2, 2016 at 3:19 PM, Steve D'Aprano wrote: > In IronPython, you could have the following occur in a function locals, just > as it could happen CPython for globals: > > - delete the name binding "x" > - which triggers a dictionary resize > - bind a value to x

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Chris Angelico
On Sun, Oct 2, 2016 at 3:25 PM, Steve D'Aprano wrote: > On Sun, 2 Oct 2016 01:58 pm, Chris Angelico wrote: > >> Hmm, I've possibly missed something here, which may indicate a >> problem. Why can't your existing machines build? Is it because they >> have too-old

[issue28325] Remove MacOS 9-specific module macurl2path.py

2016-10-01 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Thanks for landing all the changes :) It's definitely surprising to see those old CPython codes. -- ___ Python tracker

Re: unintuitive for-loop behavior

2016-10-01 Thread Steve D'Aprano
On Sun, 2 Oct 2016 11:44 am, Gregory Ewing wrote: > Steve D'Aprano wrote: >> When you say: >> >> x = 0 >> x = 1 >> >> inside a function, and the interpreter does the name binding twice, >> there's no way of telling whether it writes to the same cell each time or >> not. > > Yes, there

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Steve D'Aprano
On Sun, 2 Oct 2016 01:58 pm, Chris Angelico wrote: > Hmm, I've possibly missed something here, which may indicate a > problem. Why can't your existing machines build? Is it because they > have too-old versions of tools, and if so, which? Yes, this. You need gcc 4.8 or better to build CPython

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Steve D'Aprano
On Sun, 2 Oct 2016 12:30 am, Zachary Ware wrote: > On Oct 1, 2016 06:25, "Steve D'Aprano" wrote: >> >> Long story short: I have no working systems capable of compiling the > latest >> Python 3.6, and no time to upgrade my usual machines to something which >> will

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread Tiago Antao
Tiago Antao added the comment: I made a small patch for this. This is the first time I submit one, so please be careful with this... -- keywords: +patch nosy: +tiagoantao Added file: http://bugs.python.org/file44919/mp.patch ___ Python tracker

Re: unintuitive for-loop behavior

2016-10-01 Thread Steve D'Aprano
On Sun, 2 Oct 2016 12:28 am, Jussi Piitulainen wrote: > I'm not sure any more to what message this should be a followup, but > here is a demonstration of two different semantics of the for-loop > variable scope/update, this time with nested loops using the same loop > variable name. The first

[issue28322] chain.__setstate__ Type Confusion

2016-10-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks reasonable. -- ___ Python tracker ___ ___

[issue28334] netrc does not work if $HOME is not set

2016-10-01 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Dimitri. I think this is a reasonable improvement. However, since we are changing the behavior of the netrc() class, I'm not sure this can be considered as a bug fix. In any case, 3.3 and 3.4 are in security-fix-only mode so I'm going to

Re: announcing fython

2016-10-01 Thread Raoul Fleckman
On 2016-10-02, nicolasessisbre...@gmail.com : > **How does this compare to Python+Numpy? > **How much faster is Fython, and what are the restrictions on the > **Python code? > > Python+Numpy allows easy processing of vector, but there is a limit to > how much

Re: inplace text filter - without writing file

2016-10-01 Thread Sayth Renshaw
Thank you -- https://mail.python.org/mailman/listinfo/python-list

[issue28222] test_distutils fails

2016-10-01 Thread Berker Peksag
Berker Peksag added the comment: I can reproduce it with the following dependencies: $ pip list docutils (0.12) pip (8.1.2) setuptools (27.1.2) The test was added in issue 23063. Since the purpose of the test was testing a bug in _check_rst_data(), skipping it if pygments is

Re: announcing fython

2016-10-01 Thread Michael Torrie
On 10/01/2016 09:06 PM, Chris Angelico wrote: > On Sun, Oct 2, 2016 at 1:58 PM, wrote: >> Fython speed is the same as Fortran speed. >> >> There is no restriction on the Python code. >> Once a Fython program is avalaible, Python can throw any scalar or Numpy >>

[issue9850] obsolete macpath module dangerously broken and should be removed

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

Re: announcing fython

2016-10-01 Thread Chris Angelico
On Sun, Oct 2, 2016 at 1:58 PM, wrote: > Fython speed is the same as Fortran speed. > > There is no restriction on the Python code. > Once a Fython program is avalaible, Python can throw any scalar or Numpy > array at it. > > For the programmer convenience, like

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Chris Angelico
On Sun, Oct 2, 2016 at 1:51 PM, Steve D'Aprano wrote: > On Sun, 2 Oct 2016 09:31 am, Paul Rubin wrote: > >> Steve D'Aprano writes: >>> However I do have access to another machine (actually a VM) which can >>> compile Python 3.6. It's not

Re: announcing fython

2016-10-01 Thread nicolasessisbreton
**How does this compare to Python+Numpy? **How much faster is Fython, and what are the restrictions on the Python code? Python+Numpy allows easy processing of vector, but there is a limit to how much user-defined logic can be used with Numpy. For example, operating on three different arrays to

Re: announcing fython

2016-10-01 Thread Steve D'Aprano
On Sun, 2 Oct 2016 11:18 am, Raoul Fleckman wrote: > Interested to hear the answers to those questions, and whether Fython is > pass by reference (Fortran) or value (python, unless passing a list, for > example); That's not how Python works. Ints and lists are passed exactly the same way,

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Steve D'Aprano
On Sun, 2 Oct 2016 09:31 am, Paul Rubin wrote: > Steve D'Aprano writes: >> However I do have access to another machine (actually a VM) which can >> compile Python 3.6. It's not practical for me to use it as a my main >> development machine, but as a temporary measure,

[issue9850] obsolete macpath module dangerously broken and should be removed

2016-10-01 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +easy -needs review ___ Python tracker ___

[issue28222] test_distutils fails

2016-10-01 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hmm.. the test works for me on master branch $ ./python.exe -m test test_distutils Run tests sequentially 0:00:00 [1/1] test_distutils 1 test OK. Total duration: 4 sec Tests result: SUCCESS -- ___ Python tracker

Reading the Windows Location API

2016-10-01 Thread Glenn Linderman
I found some GeoLocation stuff on PyPi, but it seems to be focused on turning an IP address into a (rough) location rather than reading a GPS. Seems like if a GPS is attached, reading it would be the best way to obtain a more accurate location, falling back to approximations if there is no

[issue9850] obsolete macpath module dangerously broken and should be removed

2016-10-01 Thread Ned Deily
Ned Deily added the comment: It's a bit late in the 3.6 cycle to be removing macpath, but it's not too late to mark it in 3.6 as deprecated and to be removed in 3.7. If someone wants to write two patches, one for 3.6 to add a deprecation warning to the code and to the docs, the other for 3.7

[issue28325] Remove MacOS 9-specific module macurl2path.py

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 07c593845994 by Ned Deily in branch 'default': Issue #28325: Remove vestigal MacOS 9 macurl2path module and its tests. https://hg.python.org/cpython/rev/07c593845994 -- nosy: +python-dev ___ Python

[issue28325] Remove MacOS 9-specific module macurl2path.py

2016-10-01 Thread Ned Deily
Ned Deily added the comment: Thanks for the suggestion; I didn't even know that was still around. Because it is a bit late in the game for 3.6 and to be extra cautious, I decided to remove it starting with 3.7. -- resolution: -> fixed stage: -> resolved status: open -> closed type:

[issue28324] Clean up MacOS 9-specific description in the docstring of os.py

2016-10-01 Thread Ned Deily
Ned Deily added the comment: Thanks for this patch, too! -- keywords: +gsoc -patch resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> ___ Python tracker

[issue28323] Remove MacOS 9-specific codes from exit() and quit()

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2d8d9abb3bf8 by Ned Deily in branch '3.6': Issue #28323: Remove vestigal MacOS 9 checks from exit() and quit(). https://hg.python.org/cpython/rev/2d8d9abb3bf8 New changeset 2c7034d59c7b by Ned Deily in branch 'default': Issue #28323: Merge from 3.6

[issue28323] Remove MacOS 9-specific codes from exit() and quit()

2016-10-01 Thread Ned Deily
Ned Deily added the comment: Thanks for the patch! -- resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> ___ Python tracker

[issue28324] Clean up MacOS 9-specific description in the docstring of os.py

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset dbdcedf3583e by Ned Deily in branch '3.6': Issue #28324: Remove vestigal MacOS 9 references in os.py docstring. https://hg.python.org/cpython/rev/dbdcedf3583e New changeset d55fd379b994 by Ned Deily in branch 'default': Issue #28324: Merge from 3.6

Re: Byte code descriptions somewhere?

2016-10-01 Thread breamoreboy
On Saturday, October 1, 2016 at 11:57:17 PM UTC+1, Cem Karan wrote: > Hi all, I've all of a sudden gotten interested in the CPython interpreter, > and started trying to understand how it ingests and runs byte code. I found > Include/opcode.h in the python sources, and I found some basic

Merecurial and Python-2.7.x, Python-3.Y

2016-10-01 Thread Michael Felt
Finally, I got to where I understood what needed to be done to get both Mercurial built - and the the new SSL requirements met. So, running: # hg clone https://hg.python.org/cpython works. What is the next step to getting Python-2.7 AND Python-3.7 so I can submit patches against both

Thonny 2.0 released (Python IDE for beginners)

2016-10-01 Thread Aivar Annamaa
Hi! Thonny is Python IDE for learning and teaching programming. It is developed in University of Tartu, Estonia. It has an easy to use debugger which shows clearly how Python executes your programs. Unlike most debuggers, it can even show the steps of evaluating an expression, visually

Need help for the print() function with a better order

2016-10-01 Thread 380162267qq
I am trying to print a simple decision tree for my homework. The answer must keep in this format: Top 7,4,0.95 career gain = 100 1.Management 2, 3, 0.9709505944546686 2.Service 5, 1, 0.6500224216483541 location gain = 100 1.Oregon 4, 1, 0.7219280948873623

Re: inplace text filter - without writing file

2016-10-01 Thread MRAB
On 2016-10-02 01:21, Sayth Renshaw wrote: Hi I have a fileobject which was fine however now I want to delete a line from the file object before yielding. def return_files(file_list): for filename in sorted(file_list): When joining paths together, it's better to use 'os.path.join'.

Re: Lawrence D'Oliveiro

2016-10-01 Thread Gregory Ewing
On Fri, 30 Sep 2016 23:29:41 -0700, Paul Rubin declaimed the following: That's the weird Italian spam that the newsgroup has been getting for a while. I've been wondering for a while if anyone knows what the story is, i.e. why it's on comp.lang.python but not on other

Re: generator no iter - how do I call it from another function

2016-10-01 Thread Gregory Ewing
Sayth Renshaw wrote: def dataAttr(roots): """Get the root object and iter items.""" with open("output/first2.csv", 'w', newline='') as csvf: race_writer = csv.writer(csvf, delimiter=',') for meet in roots.iter("meeting"): The value of roots you're passing in here is a

[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2016-10-01 Thread Ned Deily
Ned Deily added the comment: I was hoping that the open issues could be resolved in time for b2 but that seems unlikely at this point. So I have to agree that this feature should be deferred to 3.7. Steven, can you make the necessary reverts on the 3.6 branch? --

[issue28088] Document Transport.set_protocol and get_protocol

2016-10-01 Thread Mariatta Wijaya
New submission from Mariatta Wijaya: Added the documentation for set_protocol and get_protocol. -- keywords: +patch Added file: http://bugs.python.org/file44918/issue28088.patch ___ Python tracker

Re: unintuitive for-loop behavior

2016-10-01 Thread Gregory Ewing
Steve D'Aprano wrote: When you say: x = 0 x = 1 inside a function, and the interpreter does the name binding twice, there's no way of telling whether it writes to the same cell each time or not. Yes, there is: ... x = 0 ... f1 = lambda: x ... x = 1 ... f2 = lambda: x ...

Re: ConfigParser: use newline in INI file

2016-10-01 Thread Ned Batchelder
On Saturday, October 1, 2016 at 6:25:16 PM UTC-4, Thorsten Kampe wrote: > * Ben Finney (Sun, 02 Oct 2016 07:12:46 +1100) > > > > Thorsten Kampe writes: > > > > > ConfigParser escapes `\n` in ini values as `\\n`. > > Indenting solves the problem. I'd rather keep it

Re: announcing fython

2016-10-01 Thread Chris Angelico
On Sun, Oct 2, 2016 at 11:18 AM, Raoul Fleckman wrote: > Interested to hear the answers to those questions, and whether Fython is > pass by reference (Fortran) or value (python, unless passing a list, for > example); and then there's the 'little' matter of one-based

Re: Byte code descriptions somewhere?

2016-10-01 Thread Ned Batchelder
On Saturday, October 1, 2016 at 7:48:09 PM UTC-4, Cem Karan wrote: > Cool, thank you! Quick experimentation suggests that I don't need to worry > about marking anything for garbage collection, correct? The next question > is, how do I create a stream of byte codes that can be interpreted by

inplace text filter - without writing file

2016-10-01 Thread Sayth Renshaw
Hi I have a fileobject which was fine however now I want to delete a line from the file object before yielding. def return_files(file_list): for filename in sorted(file_list): with open(dir_path + filename) as fd: for fileItem in fd: yield fileItem Ned

Re: announcing fython

2016-10-01 Thread Raoul Fleckman
On 2016-10-01, Chris Angelico wrote: > On Sat, Oct 1, 2016 at 11:41 PM, wrote: >> Fython permits to write numerical code with the same syntax then Python. >> Under the hood, the code is transpiled to Fortran and run at top speed. > > How does this

[issue28281] Remove year limits from calendar

2016-10-01 Thread Mark Gollahon
Mark Gollahon added the comment: First time patch for CPython. I followed instructions given by belopolsky and added tests. Please critique. -- keywords: +patch nosy: +golly Added file: http://bugs.python.org/file44917/calendar-no-year-limits.patch

Converting PyMember_Get usage to PyMember_GetOne - no docs?

2016-10-01 Thread Skip Montanaro
I'm trying to convert the python-sybase module C code from oldish Python 2 usage to work in Python 3. The code currently calls PyMember_Get(), which is obsolete. In later versions of Python 2, PyMember_GetOne became the official way to do things, the the former function was still available. In

[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-10-01 Thread R. David Murray
R. David Murray added the comment: OK, lets close this won't fix, then. Especially since aiohttp does use logging already Sorry, Mariatta. Thanks for the patch, but we aren't going to use it. -- resolution: -> wont fix stage: -> resolved status: open -> closed

Re: Byte code descriptions somewhere?

2016-10-01 Thread Chris Angelico
On Sun, Oct 2, 2016 at 10:47 AM, Cem Karan wrote: > Cool, thank you! Quick experimentation suggests that I don't need to worry > about marking anything for garbage collection, correct? The next question > is, how do I create a stream of byte codes that can be interpreted

Re: Byte code descriptions somewhere?

2016-10-01 Thread Paul Rubin
Cem Karan writes: > how do I create a stream of byte codes that can be interpreted by > CPython directly? Basically, study the already existing code and do something similar. The CPython bytecode isn't standardized like JVM bytecode. It's designed for the interpreter's

Re: Byte code descriptions somewhere?

2016-10-01 Thread Cem Karan
Cool, thank you! Quick experimentation suggests that I don't need to worry about marking anything for garbage collection, correct? The next question is, how do I create a stream of byte codes that can be interpreted by CPython directly? I don't mean 'use the compile module', I mean writing

Re: Byte code descriptions somewhere?

2016-10-01 Thread Ben Finney
Cem Karan writes: > Hi all, I've all of a sudden gotten interested in the CPython > interpreter, and started trying to understand how it ingests and runs > byte code. That sounds like fun! > Is there something similar to a manual dedicated to python byte code? The Python

Byte code descriptions somewhere?

2016-10-01 Thread Cem Karan
Hi all, I've all of a sudden gotten interested in the CPython interpreter, and started trying to understand how it ingests and runs byte code. I found Include/opcode.h in the python sources, and I found some basic documentation on how to add in new opcodes online, but I haven't found the

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread James Lu
Changes by James Lu : -- nosy: +James Lu ___ Python tracker ___ ___ Python-bugs-list

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Paul Rubin
Steve D'Aprano writes: > However I do have access to another machine (actually a VM) which can > compile Python 3.6. It's not practical for me to use it as a my main > development machine, but as a temporary measure, I thought I could > compile 3.6 on this VM, then

Re: RASTER analysis(slope)

2016-10-01 Thread Sayth Renshaw
On Sunday, 2 October 2016 04:52:13 UTC+11, Xristos Xristoou wrote: > hello team > > i want to calculate slope and aspect from some RASTER > IMAGE(.grid,tiff,geotiff) > who is the better method to can i do this ? > with numpy and scipy or with some package? > > > thnx you team I don't know

Re: ConfigParser: use newline in INI file

2016-10-01 Thread Thorsten Kampe
* Ben Finney (Sun, 02 Oct 2016 07:12:46 +1100) > > Thorsten Kampe writes: > > > ConfigParser escapes `\n` in ini values as `\\n`. Indenting solves the problem. I'd rather keep it one line per value but it solves the problem. Thorsten --

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Chris Angelico
On Sat, Oct 1, 2016 at 11:03 PM, Steve D'Aprano wrote: >> Are both Linuxes of broadly similar vintage? > > That depends on what you mean by "broadly similar". As far as I am > concerned, a five year difference is not very much, and is broadly > similar -- it's not like

Re: announcing fython

2016-10-01 Thread Chris Angelico
On Sat, Oct 1, 2016 at 11:41 PM, wrote: > Fython permits to write numerical code with the same syntax then Python. > Under the hood, the code is transpiled to Fortran and run at top speed. How does this compare to Python+Numpy? How much faster is Fython, and what

Re: ConfigParser: use newline in INI file

2016-10-01 Thread Thorsten Kampe
* Terry Reedy (Sat, 1 Oct 2016 15:44:39 -0400) > > On 10/1/2016 10:56 AM, Thorsten Kampe wrote: > > > ConfigParser escapes `\n` in ini values as `\\n`. Is there a way to > > signal to ConfigParser that there is a line break? > > Without an example or two, I don't really understand the question

[issue28088] Document Transport.set_protocol and get_protocol

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue28089] Document TCP_NODELAY by default

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue13756] Python3.2.2 make fail on cygwin

2016-10-01 Thread Zachary Ware
Zachary Ware added the comment: Fixed on 3.7, we can evaluate backporting later. With this committed, a build on Cygwin can succeed if you configure with --without-threads. Thanks for the patch! -- nosy: +zach.ware resolution: -> fixed stage: patch review -> resolved status: open ->

[issue13756] Python3.2.2 make fail on cygwin

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5b4c21436036 by Zachary Ware in branch 'default': Issue #13756: Fix building extensions modules on Cygwin https://hg.python.org/cpython/rev/5b4c21436036 -- nosy: +python-dev ___ Python tracker

[issue28335] Exception reporting in `logging.config`

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

Re: unintuitive for-loop behavior

2016-10-01 Thread Terry Reedy
On 10/1/2016 8:24 AM, Rustom Mody wrote: Yeah by comprehension-variable I mean the one that sits left of the ‘in’ inside the conprehension. In other words, a 'loop variable within a comprehension'. Keep in mind that there may be multiple targets for the implicit (hidden) assignment, so

Re: ConfigParser: use newline in INI file

2016-10-01 Thread Ben Finney
Thorsten Kampe writes: > ConfigParser escapes `\n` in ini values as `\\n`. How do you demonstrate that? Here is an example text of a config file:: >>> import io >>> import textwrap >>> config_text = textwrap.dedent(r""" ... [foo] ...

Re: rocket simulation game with just using tkinter

2016-10-01 Thread Irmen de Jong
On 1-10-2016 15:44, Christian Gollwitzer wrote: > Am 01.10.16 um 00:59 schrieb Irmen de Jong: >> Hi, >> >> I've made a very simple rocket simulation game, inspired by the recent >> success of SpaceX > >> You can get the code here if you want to give it a try: >>

[issue28336] Slicing (operation) is not symmetrical with respect to suffixes and prefixes

2016-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The default value of the lower bound index is 0, but the default value of the upper bound index is the length of the sequence. s[:a] is the same as s[0:a], but s[a:] is the same as s[a:len(s)]. If make s[a:0] meaning the same as s[a:len(s)], i.e. return a

Re: ConfigParser: use newline in INI file

2016-10-01 Thread Terry Reedy
On 10/1/2016 10:56 AM, Thorsten Kampe wrote: ConfigParser escapes `\n` in ini values as `\\n`. Is there a way to signal to ConfigParser that there is a line break? Without an example or two, I don't really understand the question enough to answer. -- Terry Jan Reedy --

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks reasonable. ntohl() and htonl() already raise an exception if the argument exceeds 32 bit. Added comments on Rietveld. -- nosy: +serhiy.storchaka stage: -> patch review ___ Python tracker

[issue28336] Slicing (operation) is not symmetrical with respect to suffixes and prefixes

2016-10-01 Thread Juan Carlos Pujol Mainegra
New submission from Juan Carlos Pujol Mainegra: Let s be a string or other array-like object, a, b > 0 integers, s[0:b] returns a b-long prefix to s, the same as s[:b], but s[-a:0] returns empty (for len(s) > 0 and a > 1), while it should return the same as s[-a:], an a-long suffix (a > 0).

[issue28273] Make os.waitpid() option parameter optional.

2016-10-01 Thread Jaysinh shukla
Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44916/os_waitpid_updated_codebase_2_jaysinh.diff ___ Python tracker ___

[issue28273] Make os.waitpid() option parameter optional.

2016-10-01 Thread Jaysinh shukla
Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44915/os_waitpid_updated_codebase_jaysinh.diff ___ Python tracker ___

[issue28335] Exception reporting in `logging.config`

2016-10-01 Thread Ram Rachum
Ram Rachum added the comment: I now see similar raises that could use a `from` in other places in this module, so I'd suggest going over the module and putting `from`s all over the place. -- ___ Python tracker

[issue28273] Make os.waitpid() option parameter optional.

2016-10-01 Thread Jaysinh shukla
Jaysinh shukla added the comment: Removing the `options` default argument from all the call to os.waitpid. Note: This patch is based on [this patch](http://bugs.python.org/file44822/os_waitpid-optional_options.diff) submitted by StyXman. -- nosy: +jaysinh.shukla Added file:

[issue28335] Exception reporting in `logging.config`

2016-10-01 Thread Ram Rachum
New submission from Ram Rachum: In `logging.config.DictConfigurator.configure`, there are exceptions that are caught and then replaced with `ValueError` exceptions. I think you should use the `raise x from y` syntax so that the original tracebacks will be preserved. (I'm debugging such an

[issue22392] Clarify documentation of __getinitargs__

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

Re: unintuitive for-loop behavior

2016-10-01 Thread Steve D'Aprano
On Sun, 2 Oct 2016 03:57 am, Rustom Mody wrote: > Hoo boy1 > Thats some tour de force and makes my head spin I certainly agree with the second part of your sentence. > Point can be made more simply with map > ie if we *define* > [exp for cv in l] > as > map(lambda cv: exp, l) > > the problem

[issue26617] Assertion failed in gc with __del__ and weakref

2016-10-01 Thread Guido van Rossum
Guido van Rossum added the comment: Ben Bangert reported to me that this crash caused instabilities in an app using asyncio (https://github.com/home-assistant/home-assistant/issues/3453). This hack made his crashes go away:

RASTER analysis(slope)

2016-10-01 Thread Xristos Xristoou
hello team i want to calculate slope and aspect from some RASTER IMAGE(.grid,tiff,geotiff) who is the better method to can i do this ? with numpy and scipy or with some package? thnx you team -- https://mail.python.org/mailman/listinfo/python-list

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread Ned Deily
Changes by Ned Deily : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28331] "CPython implementation detail:" is removed when contents is translated

2016-10-01 Thread Ned Deily
Changes by Ned Deily : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list

Re: unintuitive for-loop behavior

2016-10-01 Thread Rustom Mody
On Saturday, October 1, 2016 at 7:02:58 PM UTC+5:30, Jussi Piitulainen wrote: > Rustom Mody writes: > > > And then define comprehensions not as now done in terms of for loops > > that mutatingly extend the list being built up but as recursive > > functions that get (re)called for every new value

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-10-01 Thread Guido van Rossum
Guido van Rossum added the comment: A problem with switching to logging is the API design. There are three functions, log_request(), log_error() and log_message(). The former two call the latter. The API explicitly encourages overriding log_message() to customize logging. But it has no way to

[issue28334] netrc does not work if $HOME is not set

2016-10-01 Thread Dimitri Merejkowsky
New submission from Dimitri Merejkowsky: If $HOME is not set, netrc will raise an exception. Attached patch fixes the problem by using `os.path.expanduser` instead -- components: Library (Lib) files: netrc-use-expanduser.patch keywords: patch messages: 277824 nosy: Dimitri Merejkowsky

[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-10-01 Thread Jaap van der Velde
Jaap van der Velde added the comment: Closing and not fixing is fair enough - I did not realize that this would be an issue that occurs in many places in stdlib. I realize this is not a help forum, so I will ask elsewhere to see if there's some way to redirect all of sys.stderr in scenarios

[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-01 Thread Adam Bartoš
New submission from Adam Bartoš: In my setting (Python 3.6b1 on Windows), trying to prompt a non-ASCII character via input() results in mojibake. This is related to the recent fix of #1602 and so is Windows-specific. >>> input("α") ╬▒ The result corresponds to

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch Added file: http://bugs.python.org/file44913/issue28332_ver1.diff ___ Python tracker ___

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44912/patchedCPythonTestOutput_ver1.txt ___ Python tracker ___

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
New submission from Oren Milman: current state Due to the implementation of socket_htons (in Modules/socketmodule.c), in case the received integer does not fit in 16-bit unsigned integer, but does fit in a positive C int, it is silently truncated to 16-bit unsigned

ConfigParser: use newline in INI file

2016-10-01 Thread Thorsten Kampe
Hi, ConfigParser escapes `\n` in ini values as `\\n`. Is there a way to signal to ConfigParser that there is a line break? Thorsten -- https://mail.python.org/mailman/listinfo/python-list

  1   2   >