RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Ben Bacarisse wrote, on February 23, 2017 4:24 PM > > "Deborah Swanson" writes: > > >> -Original Message- > >> From: Erik [mailto:pyt...@lucidity.plus.com] > >> Sent: Thursday, February 23, 2017 2:09 AM > >> To: pyt...@deborahswanson.net;

[issue29632] argparse values for action in add_argument() should be flags instead of (or in addition to) strings

2017-02-23 Thread paul j3
paul j3 added the comment: Those strings are defined in a 'parser.registry' dictionary, with expressions like self.register('action', 'store', _StoreAction) (Users can also register their own custom classes. The registry can also be used for the 'type' attribute.) So you can already do:

[issue28556] typing.py upgrades

2017-02-23 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +242 ___ Python tracker ___ ___

[issue29191] liblzma is missing from pcbuild.sln

2017-02-23 Thread Steve Dower
Changes by Steve Dower : -- versions: +Python 3.6 ___ Python tracker ___ ___

Re: How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Irmen de Jong
On 23-2-2017 22:33, Juan C. wrote: > I need to implement a traceroute inside my script but I can't escalate > privileges. Unix uses UDP for traceroute, but I didn't find any material > regarding UDP traceroute in Python. import os os.system("traceroute www.google.com") --

Re: How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Irmen de Jong
On 24-2-2017 0:20, Juan C. wrote: > On Thu, Feb 23, 2017 at 7:42 PM, Irmen de Jong wrote: >> >> import os >> os.system("traceroute www.google.com") > > Indeed, that would work, but it isn't a great approach in my opinion > because I would rely on a system command, in this

[issue29634] Reduce deque repeat execution when maxlen exist and size is not 1

2017-02-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: The code looks fine. Please change the comment to something like: /* Reduce the number of repetitions when maxlen would be exceeded */ -- ___ Python tracker

Re: Namedtuples problem

2017-02-23 Thread MRAB
On 2017-02-23 22:51, Deborah Swanson wrote: Peter Otten wrote, on February 23, 2017 2:34 AM [snip] #untested def split_into_groups(records, key): groups = defaultdict(list) for record in records: # no need to check if a group already exists # an empty list will

[issue29637] ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs'

2017-02-23 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +239 ___ Python tracker ___

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-23 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +240 ___ Python tracker ___

[issue29463] Add `docstring` field to AST nodes

2017-02-23 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +238 ___ Python tracker ___

[issue29632] argparse values for action in add_argument() should be flags instead of (or in addition to) strings

2017-02-23 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list

[issue18792] test_ftplib timeouts

2017-02-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: https://bugs.python.org/issue29639 opened to track undoing this when appropriate. -- ___ Python tracker ___

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
MRAB wrote, on Thursday, February 23, 2017 4:06 PM > > On 2017-02-23 23:00, Deborah Swanson wrote: > > > > > >> -Original Message- > >> From: Erik [mailto:pyt...@lucidity.plus.com] > >> Sent: Thursday, February 23, 2017 2:09 AM > >> To: pyt...@deborahswanson.net; python-list@python.org >

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2017-02-23 Thread Gregory P. Smith
New submission from Gregory P. Smith: I am working on fixing our test suite to run on IPv6 only hosts (which are becoming a reality). Many failures today occur because of hard coded 127.0.0.1 values. This is wrong. We should refer to "localhost" The "solution" to

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Erik wrote, on February 23, 2017 4:03 PM > > On 23/02/17 23:00, Deborah Swanson wrote: > >> It looks to me like you are indexing into a single-element > list that > >> you are creating using the literal list syntax in the middle of > >> the expression. > > > > Actually, group is essentially a

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-23 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +235 ___ Python tracker ___ ___

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +236 ___ Python tracker ___ ___

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-02-23 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi: This command: ./python -c 'import runpy, typing; runpy.run_module("test")' -R 5:5 test_collections Sometimes gives spurious failures like this: test_collections leaked [0, 0, 3, -3, 3] memory blocks, sum=3 I think this is because ABC caches of

Re: Namedtuples problem

2017-02-23 Thread Erik
On 23/02/17 23:00, Deborah Swanson wrote: It looks to me like you are indexing into a single-element list that you are creating using the literal list syntax in the middle of the expression. Actually, group is essentially a 2-element list. Each group has a list of rows, and each row has a set

[issue18792] test_ftplib timeouts

2017-02-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI - hardcoding these addresses is now causing me problems as I try to get our test suite passing on IPv6 only hosts. "localhost" is correct. IMNSHO if for some reason a system cannot resolve "localhost" into a correct address, it should be banned from

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Irv Kalb wrote, on February 23, 2017 3:51 PM > > > On Feb 23, 2017, at 3:00 PM, Deborah Swanson > > > wrote: > > > > The weirdness is that > > > > group[0][4] > > > > gets the right answer, but > > > >

[issue29634] Reduce deque repeat execution when maxlen exist and size is not 1

2017-02-23 Thread Louie Lu
Louie Lu added the comment: Raymond: comment has changed, pushed on to GitHub. -- ___ Python tracker ___ ___

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2017-02-23 Thread Daniel Himmelstein
Changes by Daniel Himmelstein : -- pull_requests: +232 ___ Python tracker ___

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: > I'm going to close this issue. I was doing to do so, here was my message: > See shells sources. According to the manpage `pwd -L` just uses PWD from > environment. I looked directly at `pwd` sources, and

How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Juan C.
I need to implement a traceroute inside my script but I can't escalate privileges.  Unix uses UDP for traceroute, but I didn't find any material regarding UDP traceroute in Python. -- https://mail.python.org/mailman/listinfo/python-list

RE: Python application launcher (for Python code)

2017-02-23 Thread Deborah Swanson
Cholo Lennon wrote, on February 23, 2017 7:58 AM > > On 02/20/2017 07:56 PM, Deborah Swanson wrote: > > Basically, I now have quite a few Python programs I use frequently, > > and as time goes on my collection and uses of it will grow. > Right now > > I just want a way to select which one I'd

RE: Python application launcher (for Python code)

2017-02-23 Thread Deborah Swanson
Michael Torrie wrote, on February 23, 2017 7:43 AM > > On 2017-02-22 09:49 PM, Deborah Swanson wrote: > > Didn't even look. Visual Studio has always been pricey, and it never > > occurred to me that they might have a free or cheap version now. > > You can get the full edition of Visual Studio,

[issue28556] typing.py upgrades

2017-02-23 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +241 ___ Python tracker ___ ___

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 'cd' is not an external command and has no manpage. It is a shell builtin command. Most os functions are thin wrappers around system calls. There is no system call that works as 'cd' without '-P'. If you implement a shell in Python, you perhaps need an

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: Thanks for the additional information! > The 'cd' man page says that 'cd -P' should "perform actions equivalent to the > chdir() function". Just wondering, do you know what is the function called by `cd`/`cd -L` then? It doesn't seems to be a bash internal

[issue29636] Specifying indent in the json.tool command

2017-02-23 Thread Daniel Himmelstein
New submission from Daniel Himmelstein: The utility of `python -m json.tool` would increase if users could specify the indent level. Example use case: newlines in a JSON document are important for readability and the ability to open in a text editor. However, if the file is large, you can

[issue22273] abort when passing certain structs by value using ctypes

2017-02-23 Thread Vinay Sajip
Vinay Sajip added the comment: > It occurs to me that in the 1st pass, it also needs to propagate the > non-argument flag from any field that has it set. So does that mean disallowing a structure which contains a union? What about if the final structure is large enough to require passing in

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> closed ___ Python tracker ___

[issue29637] ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs'

2017-02-23 Thread Jakub Wilk
New submission from Jakub Wilk: With git master (4c78c527d215c37472145152cb0e95f196cdddc9) I get this: >>> import ast >>> ast.get_docstring(ast.parse('')) Traceback (most recent call last): File "", line 1, in File "/home/jwilk/opt/lib/python3.7/ast.py", line 203, in get_docstring text

[issue22273] abort when passing certain structs by value using ctypes

2017-02-23 Thread Eryk Sun
Eryk Sun added the comment: Perhaps it should instead use two specific flags, TYPEFLAG_HASBITFIELD and TYPEFLAG_HASUNION, which are propagated unconditionally from the base class and fields. As a base case, a union itself is flagged TYPEFLAG_HASUNION. Arrays are unrolled on X86_64 only if

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-23 Thread Carson Lam
Changes by Carson Lam : -- nosy: +Carson Lam ___ Python tracker ___ ___ Python-bugs-list

[issue28909] Adding LTTng-UST tracing support

2017-02-23 Thread Peter McCormick
Peter McCormick added the comment: Hi Łukasz, thank you for the feedback! > "PyTrace" is already a name in use for a different purpose. I understand the > itch to make the name more "right" but I am in general not a fan of renaming > "PyDTrace" to anything else now. It was a placeholder from

[issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch

2017-02-23 Thread Petr MOTEJLEK
Changes by Petr MOTEJLEK : -- pull_requests: +231 ___ Python tracker ___ ___

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: > Most os functions are thin wrappers around system calls. There is no system > call that works as 'cd' without '-P'. I would like to believe in this, but then if `cd` is some bash internal, how does `/usr/bin/pwd -L` find it back? > Since yours is the

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Just wondering, do you know what is the function called by `cd`/`cd -L` then? > It doesn't seems to be a bash internal tweak because `/usr/bin/pwd -L` is > able to get the symlink path, and this binary is not part of bash. See shells sources. According to

[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-02-23 Thread Marco Buttu
Marco Buttu added the comment: Hello Jim, do you have the time to make a pull request? Let me know, otherwise I will do it -- ___ Python tracker ___

[issue27593] Deprecate sys._mercurial and create sys._git

2017-02-23 Thread Steve Dower
Steve Dower added the comment: It looks to me like we want: branch=`git name-rev --name-only HEAD` revision=`git rev-parse HEAD` tag=`git name-rev --tags --name-only HEAD` Unless we're planning on leaving out the tag? My PR 262 makes the Windows build changes in master, but doesn't change

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-23 Thread John Florian
John Florian added the comment: I just stumbled onto this though I'm not writing for Windows. Instead, I'm on Fedora 25 with Python 3.5.2 and I went nearly crazy tracing down what seemed to be inconsistent behavior. My use case has Python using NamedTemporaryFile(delete=True) in a CM to

Re: Metaclass to rewrite class __doc__?

2017-02-23 Thread Peter Otten
Skip Montanaro wrote: > I stumbled upon this use of a metaclass to modify function docstrings: > > http://www.jesshamrick.com/2013/04/17/rewriting-python-docstrings-with-a-metaclass/ > > In certain circumstances (mostly when extending some Pybind11 wrappers), > it might be nice to extend/modify

[issue28909] Adding LTTng-UST tracing support

2017-02-23 Thread Francis Deslauriers
Francis Deslauriers added the comment: I am finally having the time to work in this. > A nit: the name LTTng-UST is rather unfriendly, especially when used without > the dash and in all lowercase characters. Given that we're using "dtrace" and > "systemtap", it would be simpler to just use

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread R. David Murray
R. David Murray added the comment: Since yours is the itch, I'm afraid you are going to have to be the one to figure out how this could be implemented :) -- ___ Python tracker

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Steve Dower
Steve Dower added the comment: I have built an updated web installer which should allow us to replace just the one file on the server to fix the issue. The only downside is that it is not compatible with existing installs of 3.5.3 (that is, you can't run the executable to Modify/Repair/Remove

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread R. David Murray
R. David Murray added the comment: Ah, that should all be implementable from your python shell, then, no need for support in the os module. For reference, when I said 'cd man page', this is what I was referring to: http://www.unix.com/man-page/posix/1posix/cd/ I'm going to close this issue.

[issue16355] inspect.getcomments() does not work in the interactive shell

2017-02-23 Thread Marco Buttu
Marco Buttu added the comment: Hello Vajrasky, the doc patch LGTM. Looking at the David's comment in Rietveld, it seems that he does not want the test patch to be applyed. Can you please make a pull request? Thank you very much -- ___ Python

[issue29455] Mention coverage.py in trace module documentation

2017-02-23 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +233 ___ Python tracker ___ ___

[issue27593] Deprecate sys._mercurial and create sys._git

2017-02-23 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +234 ___ Python tracker ___ ___

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-23 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26184] raise an error when create_module() is not defined by exec_module() is for loaders

2017-02-23 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: should be closed by #28026, it now raises an ImportError. I think this can be closed. Unless one want to change the text in Starting in Python 3.6 it will be an error > Starting in Python 3.6 it will be an error To use the past tense. -- nosy:

[issue29634] Reduce deque repeat execution when maxlen exist and size is not 1

2017-02-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue27788] platform module's version number doesn't match its docstring

2017-02-23 Thread Berker Peksag
Berker Peksag added the comment: Perhaps it's now time to drop that __version__ attribute in 3.7? We've removed the __version__ attribute from the email module in issue 22508. -- nosy: +berker.peksag stage: -> patch review ___ Python tracker

[issue26184] Add versionchanged note for error when create_module() is not defined by loaders

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: That should actually be a versionchanged note now - converting this to an easy documentation issue to cover that change. -- assignee: -> docs@python components: +Documentation -Interpreter Core keywords: +easy nosy: +docs@python stage: test needed ->

[issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5

2017-02-23 Thread Nick Coghlan
Changes by Nick Coghlan : -- type: -> behavior ___ Python tracker ___ ___

[issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5

2017-02-23 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___

RE: Python application launcher (for Python code)

2017-02-23 Thread Deborah Swanson
Gregory Ewing wrote, on February 23, 2017 9:13 PM > > Deborah Swanson wrote: > > As for it phoning home... Wonder what value they think this has, other > > than giving them a nosecount of how many active copies there are at > > any given time. > > It gives them a kill switch. If they decide

Re: Python application launcher (for Python code)

2017-02-23 Thread Gregory Ewing
Deborah Swanson wrote: As for it phoning home... Wonder what value they think this has, other than giving them a nosecount of how many active copies there are at any given time. It gives them a kill switch. If they decide they don't want it to be free any more, they can stop us from using it.

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Gregory Ewing wrote, on February 23, 2017 9:07 PM > > Deborah Swanson wrote: > > I've run into this kind of problem with namedtuples before, > trying to > > access field values with variable names, like: > > > > label = 'Location' > > records.label > > If you need to access an attribute whose

Re: Disallowing instantiation of super class

2017-02-23 Thread Irv Kalb
> On Feb 23, 2017, at 4:40 PM, MRAB wrote: > > On 2017-02-24 00:19, Irv Kalb wrote: >> Hi, >> >> I have built a set of three classes: >> >> - A super class, let's call it: Base >> >> - A class that inherits from Base, let's call that: ClassA >> >> - Another

Re: Namedtuples problem

2017-02-23 Thread Gregory Ewing
Deborah Swanson wrote: I've run into this kind of problem with namedtuples before, trying to access field values with variable names, like: label = 'Location' records.label If you need to access an attribute whose name is computed at run time, you want getattr() and setattr(): value =

[issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: For easier cross-referencing, note that http://bugs.python.org/issue29514 is the issue proposing a test case that ensures future maintainers are aware of the practical problems created by bumping the bytecode magic number in a maintenance release. --

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: John, your problem sounds different - if you're opening the files in binary mode, then you'll be getting a default buffer that's probably 4k or 8k in size, so if you're writing less content than that, the subprocess won't see anything until you explicitly

[issue29191] liblzma is missing from pcbuild.sln

2017-02-23 Thread Mo Jia
Mo Jia added the comment: I think let user add the liblzma project by hand is not good enough. While the build.bat don't have this problem. So they should work similar. -- nosy: +Mo.Jia versions: -Python 3.5, Python 3.6 ___ Python tracker

[issue29549] Improve docstring for str.index

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Write docstrings in following style: "index($self, sub, start=0, end=sys.maxsize, /)\n" "--\n" "\n" "\n" "\n" "" Extract the summary line. Don't use the metavariable "S" since it no longer defined in the signature. --

[issue28556] typing.py upgrades

2017-02-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +237 ___ Python tracker ___ ___

[issue29637] ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs'

2017-02-23 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- nosy: +mbussonn ___ Python tracker ___ ___

Re: Namedtuples problem

2017-02-23 Thread Irv Kalb
> On Feb 23, 2017, at 3:00 PM, Deborah Swanson > wrote: > > The weirdness is that > > group[0][4] > > gets the right answer, but > > group[[idx][records_idx[label]]], > where idx = 0 and records_idx[label]] = 4 If that's the

Re: Namedtuples problem

2017-02-23 Thread MRAB
On 2017-02-23 23:00, Deborah Swanson wrote: -Original Message- From: Erik [mailto:pyt...@lucidity.plus.com] Sent: Thursday, February 23, 2017 2:09 AM To: pyt...@deborahswanson.net; python-list@python.org Subject: Re: Namedtuples problem Hi, On 23/02/17 09:38, Deborah Swanson wrote:

Re: Namedtuples problem

2017-02-23 Thread Ben Bacarisse
"Deborah Swanson" writes: >> -Original Message- >> From: Erik [mailto:pyt...@lucidity.plus.com] >> Sent: Thursday, February 23, 2017 2:09 AM >> To: pyt...@deborahswanson.net; python-list@python.org >> Subject: Re: Namedtuples problem >> >> >> Hi, >> >> On

Re: Disallowing instantiation of super class

2017-02-23 Thread Peter Otten
Irv Kalb wrote: > Hi, > > I have built a set of three classes: > > - A super class, let's call it: Base > > - A class that inherits from Base, let's call that: ClassA > > - Another class that inherits from Base, let's call that: ClassB > > ClassA and ClassB have some code in their

[issue22273] abort when passing certain structs by value using ctypes

2017-02-23 Thread Vinay Sajip
Vinay Sajip added the comment: > Perhaps it should instead use two specific flags, TYPEFLAG_HASBITFIELD and > TYPEFLAG_HASUNION This seems better at first sight. It's not making any suitability decisions (apart from doing the unrolling), and the meaning of these flags will be less volatile

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Peter Otten wrote, on February 23, 2017 2:34 AM > > Deborah Swanson wrote: > > > > Can anyone see why I'm getting this Index error? and how to fix it? > > I'm not completely sure I can follow you, but you seem to be > mixing two problems > > (1) split a list into groups > (2) convert a list

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
> -Original Message- > From: Erik [mailto:pyt...@lucidity.plus.com] > Sent: Thursday, February 23, 2017 2:09 AM > To: pyt...@deborahswanson.net; python-list@python.org > Subject: Re: Namedtuples problem > > > Hi, > > On 23/02/17 09:38, Deborah Swanson wrote: > >

Re: How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Juan C.
On Thu, Feb 23, 2017 at 7:42 PM, Irmen de Jong wrote: > > import os > os.system("traceroute www.google.com") Indeed, that would work, but it isn't a great approach in my opinion because I would rely on a system command, in this case Windows uses tracert while UNIX uses

Disallowing instantiation of super class

2017-02-23 Thread Irv Kalb
Hi, I have built a set of three classes: - A super class, let's call it: Base - A class that inherits from Base, let's call that: ClassA - Another class that inherits from Base, let's call that: ClassB ClassA and ClassB have some code in their __init__ methods that set some instance

Spyder 3.1.3 update

2017-02-23 Thread Pablo Lozano
Good day, I installed the Spyder 3.6 IDE from the Anaconda package and at the start k to the IDE I get the Spyder Update saying Spyder 3.1.3 is available. Did it incorrectly install Anaconda? As far as I know Spyder 3.1.3 is rather old and the latest is 3.6 Regards Pablo --

Re: Disallowing instantiation of super class

2017-02-23 Thread MRAB
On 2017-02-24 00:19, Irv Kalb wrote: Hi, I have built a set of three classes: - A super class, let's call it: Base - A class that inherits from Base, let's call that: ClassA - Another class that inherits from Base, let's call that: ClassB ClassA and ClassB have some code in their

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Francisco Demartino
Changes by Francisco Demartino : -- pull_requests: +213 status: pending -> open ___ Python tracker ___

[issue29631] Error “importlib.h, importlib_external.h updated. You will need to rebuild pythoncore to see the changes.” is reported when build Python on Winodws

2017-02-23 Thread Karen
New submission from Karen: We use VS2015 to build Python(branch 3.6)on Windows. It failed with error "importlib.h, importlib_external.h updated. You will need to rebuild pythoncore to see the changes". This error is reported from Python 3.6 branch revision 3ab24bd. The detailed error log file

Re: Namedtuples problem

2017-02-23 Thread Peter Otten
Deborah Swanson wrote: > This is how the list of namedtuples is originally created from a csv: > > infile = open("E:\\Coding projects\\Pycharm\\Moving\\Moving 2017 in - > test.csv") > rows = csv.reader(infile)fieldnames = next(rows) > Record = namedtuple("Record", fieldnames) > records =

Re: Namedtuples problem

2017-02-23 Thread Peter Otten
Peter Otten wrote: > Functions to the rescue: On second thought this was still more code than necessary. Why not calculate a column on demand? Here's a self-containe example: $ cat swanson_grouped_columns_virtual.py import operator from collections import defaultdict, namedtuple def

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Francisco Demartino
Francisco Demartino added the comment: Serhiy, Chris, thank you for your additional comments. They surely helped me understand why my solution to this "problem?" isn't that good (also I slept on it a bit and maybe that helped). I still ponder for a way to get autocompletion while

[issue29632] argparse values for action in add_argument() should be flags instead of (or in addition to) strings

2017-02-23 Thread Pedro
New submission from Pedro: The possible values for action are currently: 'store' 'store_true' 'store_false' 'store_const' 'append' 'append_const' 'count' 'help' 'version' a subclass of argparse.Action The string values are evidently for backward compatibility with optparse. However, adding the

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +218 ___ Python tracker ___ ___

[issue18423] Document limitations on -m

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: The limitation noted in #18422 was specific to 3.3, as the missing API was added to NamespaceLoader in 3.4. So the current documentation is accurate for recent versions of Python. -- nosy: +ncoghlan resolution: -> out of date stage: needs patch ->

end=

2017-02-23 Thread peterreavey32
Using python at home as oppose to using it at school and getting a syntax error for the line end= but this has worked previously at school. I think the version I've got at home is newer than the one at school - should this affect it? -- https://mail.python.org/mailman/listinfo/python-list

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -57 ___ Python tracker ___ ___

Re: Namedtuples problem

2017-02-23 Thread Steve D'Aprano
On Thu, 23 Feb 2017 08:38 pm, Deborah Swanson wrote: > However, > > group[[idx][records_idx[label]]] > gets an Index Error: list index out of range That's not very helpful: judging from that line alone, there could be as many as THREE places in that line of code that might generate IndexError.

Re: Namedtuples problem

2017-02-23 Thread Pavol Lisy
On 2/23/17, Peter Otten <__pete...@web.de> wrote: > Peter Otten wrote: > >> Functions to the rescue: > > On second thought this was still more code than necessary. If we are talking about less code than necessary then probably we could use something from python's ecosystem... >>> import pandas

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Steve Dower
Steve Dower added the comment: Creating a repaired installer is possible, though risky (it's easy when I still have the original build handy, but at this stage a rebuild will produce different hashes and make things worse). But I intend to look into that as soon as I can. If the launcher is

Re: end=

2017-02-23 Thread Chris Angelico
On Fri, Feb 24, 2017 at 12:23 AM, wrote: > Using python at home as oppose to using it at school and getting a syntax > error for the line end= but this has worked previously at school. I think the > version I've got at home is newer than the one at school - should this

[issue28911] Clarify the behaviour of assert_called_once_with

2017-02-23 Thread Arne de Laat
Changes by Arne de Laat : -- pull_requests: +219 ___ Python tracker ___ ___

[issue28121] If module starts with comment or empty line then frame.f_code.co_firstlineno is inconsistent with inspect.findsource

2017-02-23 Thread Aivar Annamaa
Aivar Annamaa added the comment: Looks like I misinderstood inspect.findsource. I thought it is supposed to give only the code for argument object (eg. only def code when given a function), but looks like it is giving the whole file. Unfortunately inspect.findsource is not documented in

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is how Python works. Accessing an attribute (and even checking that the attribute exists) can trigger code executing. Changes in https://github.com/franciscod/cpython/tree/bpo-29630 break autocompliting of proxy objects. And in any case it triggers

[issue22273] abort when passing certain structs by value using ctypes

2017-02-23 Thread Eryk Sun
Eryk Sun added the comment: > Perhaps you mean 16 rather than 8? Sorry, that was a misfire. It should be 16. -- ___ Python tracker ___

  1   2   >