[issue25731] Assigning and deleting __new__ attr on the class does not allow to create instances of this class

2015-12-01 Thread Eryk Sun
Changes by Eryk Sun : -- nosy: +benjamin.peterson, twouters ___ Python tracker ___ ___

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Rick Johnson
On Tuesday, December 1, 2015 at 10:56:27 AM UTC-6, John Gordon wrote: > Rick Johnson writes: > > Your lament does remind me of a pet peeve i have concerning Python, and > > that is, the lie about: "THERE SHOULD BE ONE (AND PREFERABLY ONLY ONE) > > WAY TO DO IT!". In fact, in python there is almost

Re: I can't understand re.sub

2015-12-01 Thread Erik
On 01/12/15 05:28, Jussi Piitulainen wrote: A real solution should be aware of the actual structure of those lines, assuming they follow some defined syntax. I think that we are in violent agreement on this ;) E. -- https://mail.python.org/mailman/listinfo/python-list

Re: Could you explain this rebinding (or some other action) on "nums = nums"?

2015-12-01 Thread Denis McMahon
On Tue, 01 Dec 2015 16:18:49 -0500, Terry Reedy wrote: > On 12/1/2015 3:32 PM, Denis McMahon wrote: >> On Tue, 01 Dec 2015 03:32:31 +, MRAB wrote: >> >>> In the case of: >>> >>> tup[1] += [6, 7] >>> >>> what it's trying to do is: >>> >>> tup[1] = tup[1].__iadd__([6, 7]) >>> >>>

Re: Could you explain this rebinding (or some other action) on "nums = nums"?

2015-12-01 Thread Terry Reedy
On 12/1/2015 3:32 PM, Denis McMahon wrote: On Tue, 01 Dec 2015 03:32:31 +, MRAB wrote: In the case of: tup[1] += [6, 7] what it's trying to do is: tup[1] = tup[1].__iadd__([6, 7]) tup[1] refers to a list, and the __iadd__ method _does_ mutate it, but then Python tries to

Re: Could you explain this rebinding (or some other action) on "nums = nums"?

2015-12-01 Thread Erik
On 01/12/15 21:37, Denis McMahon wrote: The assignment succeeds. That's imo a bug. If it's a TypeError to try and assign a value to tup[1], then tup[1] should not allow the mutated list to be assigned. Nothing got assigned. That original list object remains in that slot. However, it has been

Re: Is Microsoft Windows secretly downloading childporn to your computer ?!

2015-12-01 Thread Ian Kelly
On Tue, Dec 1, 2015 at 12:49 PM, Steve Hayes wrote: > On Tue, 1 Dec 2015 03:19:39 +0100, "Skybuck Flying" > wrote: > >>Hello, >> >>The question is: >> >>Is Microsoft Windows secretly downloading childporn to your computer ?! > > You download things

Re: Could you explain this rebinding (or some other action) on "nums = nums"?

2015-12-01 Thread Denis McMahon
On Tue, 01 Dec 2015 14:44:38 -0600, Ian Kelly wrote: > On Tue, Dec 1, 2015 at 2:32 PM, Denis McMahon > wrote: >> On Tue, 01 Dec 2015 03:32:31 +, MRAB wrote: >> >>> In the case of: >>> >>> tup[1] += [6, 7] >>> >>> what it's trying to do is: >>> >>> tup[1] =

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Martin Panter
Martin Panter added the comment: Left a review comment which may help you chase that refleak Also, as a new feature, surely it should be documented? -- nosy: +martin.panter ___ Python tracker

Re: Pylint 1.5.0 / Astroid 1.4.1 released

2015-12-01 Thread Omar Abou Mrad
On Tue, Dec 1, 2015 at 1:42 AM, Claudiu Popa wrote: > Hello, > > > I'm happy to announce you the release of Pylint 1.5.0, > respectively Astroid 1.4.1. > > > > Claudiu > -- > https://mail.python.org/mailman/listinfo/python-list > Awesome! Congrats! --

Re: Could you explain this rebinding (or some other action) on "nums = nums"?

2015-12-01 Thread Ian Kelly
On Tue, Dec 1, 2015 at 2:32 PM, Denis McMahon wrote: > On Tue, 01 Dec 2015 03:32:31 +, MRAB wrote: > >> In the case of: >> >> tup[1] += [6, 7] >> >> what it's trying to do is: >> >> tup[1] = tup[1].__iadd__([6, 7]) >> >> tup[1] refers to a list, and the

Re: Could you explain this rebinding (or some other action) on "nums = nums"?

2015-12-01 Thread Denis McMahon
On Tue, 01 Dec 2015 03:32:31 +, MRAB wrote: > In the case of: > > tup[1] += [6, 7] > > what it's trying to do is: > > tup[1] = tup[1].__iadd__([6, 7]) > > tup[1] refers to a list, and the __iadd__ method _does_ mutate it, but > then Python tries to put the result that the method

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Rick Johnson
On Tuesday, December 1, 2015 at 1:55:59 AM UTC-6, Steven D'Aprano wrote: > Python was never intended to be "merely" a teaching language. I think > Guido's original vision was for it to be a glue language between C > libraries, and a scripting language. It's a well know fact that GvR was

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Manolo Martínez
Peter, thanks for taking the time to look into my code. On 12/01/15 at 11:40am, Peter Otten wrote: > Manolo Martínez wrote: > > def main(): # parse the args and call whatever function was > selected > > try: > > args =

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Joe Jevnik
Joe Jevnik added the comment: Thanks for pointing me at the refleak, uploading an update -- Added file: http://bugs.python.org/file41203/methodcaller-attrs-1.patch ___ Python tracker

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Joe Jevnik
Joe Jevnik added the comment: Added a test case for the mutation of keywords. -- Added file: http://bugs.python.org/file41204/methodcaller-attrs-2.patch ___ Python tracker

[issue25714] Consider isinstance(..., numbers.Integral) instead of isinstance(..., int) or isinstance(..., (int, long)) in datetime.py

2015-12-01 Thread Matt Bogosian
Matt Bogosian added the comment: > I consider this as a bug and think that we should weak some of checks > isinstance(..., int) to isinstance(..., (int, long)). numbers.Integral is too > wide type, C implementation doesn't support it. Oddly enough, the C implementation is what is working with

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Peter Otten
Manolo Martínez wrote: > Peter, thanks for taking the time to look into my code. > > On 12/01/15 at 11:40am, Peter Otten wrote: >> Manolo Martínez wrote: >> > def main(): # parse the args and call whatever function was >> selected >> > try: >> >

Re: "Downloading"

2015-12-01 Thread Chris Angelico
On Wed, Dec 2, 2015 at 6:05 AM, Random832 wrote: > On 2015-12-01, Steve Hayes wrote: >> You download things FROM a computer, you upload them TO a computer. > > I'm a little bit confused as to what kinds of file transfers > you think don't have at

[issue24731] Incorrect assert in str_subtype_new

2015-12-01 Thread Kevin Modzelewski
Kevin Modzelewski added the comment: Awesome, thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing

Re: "Downloading"

2015-12-01 Thread Steven D'Aprano
On Wed, 2 Dec 2015 06:05 am, Random832 wrote: > On 2015-12-01, Steve Hayes wrote: >> You download things FROM a computer, you upload them TO a computer. > > I'm a little bit confused as to what kinds of file transfers > you think don't have at least two endpoints. If you

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Gregory Ewing
Rick Johnson wrote: the lie about: "THERE SHOULD BE ONE (AND PREFERABLY ONLY ONE) WAY TO DO IT!". You're misquoting the Zen. It says there should be one *obvious* way to do it. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Could you explain this rebinding (or some other action) on "nums = nums"?

2015-12-01 Thread Erik
Apologies for self-replying, On 01/12/15 22:34, Erik wrote: what you're asking for is that the *container* object whose element is being assigned to is first queried as to whether it will accept a mutated element being assigned to it before that element is mutated. What I said above is

Re: "Downloading"

2015-12-01 Thread Ian Kelly
On Tue, Dec 1, 2015 at 5:05 PM, Chris Angelico wrote: > On Wed, Dec 2, 2015 at 6:05 AM, Random832 wrote: >> On 2015-12-01, Steve Hayes wrote: >>> You download things FROM a computer, you upload them TO a computer. >> >> I'm a

Re: "Downloading"

2015-12-01 Thread Erik
On 01/12/15 23:28, Ian Kelly wrote: What about transfers that are initiated by neither? scp remote_host1:path/to/file remote_host2:path/to/destination Regardless of how the transfer is invoked, in traditional parlance the source uploads, the target downloads. Why is this on the Python

Re: Could you explain this rebinding (or some other action) on "nums = nums"?

2015-12-01 Thread Terry Reedy
On 12/1/2015 4:36 PM, Denis McMahon wrote: On Tue, 01 Dec 2015 16:18:49 -0500, Terry Reedy wrote: On 12/1/2015 3:32 PM, Denis McMahon wrote: On Tue, 01 Dec 2015 03:32:31 +, MRAB wrote: In the case of: tup[1] += [6, 7] what it's trying to do is: tup[1] =

Re: "Downloading"

2015-12-01 Thread Chris Angelico
On Wed, Dec 2, 2015 at 10:28 AM, Ian Kelly wrote: > On Tue, Dec 1, 2015 at 5:05 PM, Chris Angelico wrote: >> On Wed, Dec 2, 2015 at 6:05 AM, Random832 wrote: >>> On 2015-12-01, Steve Hayes wrote: You

Re: python domain in China. This showed up on Python list

2015-12-01 Thread Steven D'Aprano
On Tue, 1 Dec 2015 10:49 pm, Laura Creighton wrote: > In a message of Tue, 01 Dec 2015 02:51:21 -0800, Chris Rebert writes: >>I hate to break it to you, but this seems to be just another of those >>come-ons spammed out by various scummy businesses that trawl WHOIS >>databases for people to scam

Re: "Downloading"

2015-12-01 Thread Chris Angelico
On Wed, Dec 2, 2015 at 10:46 AM, Steven D'Aprano wrote: > On Wed, 2 Dec 2015 06:05 am, Random832 wrote: > >> On 2015-12-01, Steve Hayes wrote: >>> You download things FROM a computer, you upload them TO a computer. >> >> I'm a little bit confused as to

Re: Is Microsoft Windows secretly downloading childporn to your computer ?!

2015-12-01 Thread Skybuck Flying
It's not YOU doing it. Since you obviously don't understand that it's not worth reading anything else you wrote LOL. Bye, Skybuck. -- https://mail.python.org/mailman/listinfo/python-list

[issue23674] super() documentation isn't very clear

2015-12-01 Thread Martin Panter
Martin Panter added the comment: Here are some specific changes I suggest: 1. Most confusing: super() uses the MRO of the second argument, not the first. 2. Clarify that is is not just the first argument that is skipped in the MRO, it is all preceding classes as well. The first argument does

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Steven D'Aprano
On Wed, 2 Dec 2015 07:33 am, Rick Johnson wrote: > On Tuesday, December 1, 2015 at 1:55:59 AM UTC-6, Steven D'Aprano wrote: >> Python was never intended to be "merely" a teaching language. I think >> Guido's original vision was for it to be a glue language between C >> libraries, and a scripting

[issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong)

2015-12-01 Thread Martin Panter
Martin Panter added the comment: I am proposing some documentation changes in Issue 23674 which would address this. -- assignee: -> docs@python components: +Documentation -Interpreter Core dependencies: +super() documentation isn't very clear nosy: +docs@python, martin.panter

Re: static variables

2015-12-01 Thread Steven D'Aprano
On Tue, 1 Dec 2015 08:15 pm, Grobu wrote: > Perhaps you could use a parameter's default value to implement your > static variable? > > Like : > # - > >>> def test(arg=[0]): > ... print arg[0] > ... arg[0] += 1 > ... Awesome! I'm not

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Steven D'Aprano
On Tue, 1 Dec 2015 07:44 pm, Manolo Martínez wrote: > On 12/01/15 at 12:00pm, Steven D'Aprano wrote: >> I'm trying to understand why vars() exists. Does anyone use it? > > Well, I have this little podcast aggregator > (https://github.com/manolomartinez/greg) that I and a bunch of other > people

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Ben Finney
Steven D'Aprano writes: > You misunderstand the koan. > > "There should be one way to do it" does not prohibit more than one > way. Further, that's omitting a very important modifier from the koan. Even without the parenthetical, the koan reads: There

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Martin Panter
Martin Panter added the comment: This is a bit odd. You can mutate the keyword arguments, but you are not allowed to change the positional arguments (“args” is readonly). If you want this to be part of the supported API, it should be documented, but it seems like bad design IMO. --

Re: static variables

2015-12-01 Thread Erik
On 02/12/15 01:02, Steven D'Aprano wrote: On Tue, 1 Dec 2015 08:15 pm, Grobu wrote: # - >>> def test(arg=[0]): ... print arg[0] ... arg[0] += 1 Awesome! Hideous! using a mutable default as static storage. Exposing something a

[issue25177] OverflowError in statistics.mean when summing large floats

2015-12-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: Larry, Is it too late to get this into 3.5rc1? changeset 99407:ed45a09e5a69 Thanks. -- nosy: +larry ___ Python tracker

Re: static variables

2015-12-01 Thread Steven D'Aprano
On Wed, 2 Dec 2015 12:16 pm, Erik wrote: > On 02/12/15 01:02, Steven D'Aprano wrote: >> On Tue, 1 Dec 2015 08:15 pm, Grobu wrote: >>> # - >>> >>> def test(arg=[0]): >>> ... print arg[0] >>> ... arg[0] += 1 >> Awesome! > > Hideous! > >>

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread boB Stepp
On Mon, Nov 30, 2015 at 7:00 PM, Steven D'Aprano wrote: > > Either way, vars() doesn't solve the problem. What problem does it solve? > I'm way out of my depth here (I normally post on Tutor, as Steve knows), but when I looked vars() up in Lutz's "Python Pocket Reference,

[issue25772] Misleading descriptions about built-in `super.`

2015-12-01 Thread Eryk Sun
Eryk Sun added the comment: > Just FYI, 'super' is not a type No, super is a type: >>> super It's one of 3 types defined in Objects/typeobject.c: PyBaseObject_Type : "object" PyType_Type : "type" PySuper_Type : "super" A super instance (CPython superobject)

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread John Gordon
In <4f0f7fc5-c93a-4223-9c05-e192a8faf...@googlegroups.com> Rick Johnson writes: > Your lament does remind me of a pet peeve i have concerning Python, and > that is, the lie about: "THERE SHOULD BE ONE (AND PREFERABLY ONLY ONE) > WAY TO DO IT!". In fact, in python

[issue25772] Misleading descriptions about built-in `super.`

2015-12-01 Thread R. David Murray
R. David Murray added the comment: Heh. OK, learn something new every day. -- ___ Python tracker ___ ___

4D arrays

2015-12-01 Thread jorge . conrado
Hi, I use the IDL but now I'm change to PYTHON. I have a 4D array (time, level,lon,lat). I would like to get a 2D array for a specific time (time1) and level (level1). In IDL I use: 2Darray = 4Darray(time1,level1,*,*). How can I get the 2D array in Python Conrado --

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: At the problematic breakpoint mentioned in msg255630, copy_reg is nearly empty. (Pdb) sys.modules['copy_reg'] (Pdb) dir(sys.modules['copy_reg']) ['__builtins__', '__doc__', '__file__', '__name__', '__package__'] (Pdb) sys.modules['copy_reg'].__file__

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Was it empty before running any test_cpickle tests? Could you find after what test it becomes empty? -- ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Well, one thing I noticed is that init_stuff() in cPickle.c can leak the copy_reg module object, if any of the subsequent PyObject_GetAttr*() calls fail. They return -1 without decref'ing copyreg. Probably not a horrible leak since it's probably rare, but

[issue25774] [benchmarks] Adjust to allow uploading benchmark data to codespeed

2015-12-01 Thread Zachary Ware
New submission from Zachary Ware: Here's a patch to the benchmarks repo that allows running a benchmark on a single interpreter and returning raw data, and provides a script to upload the raw data to a codespeed instance. It's a bit of a quick hack, but is effective. This is a prerequisite

Re: 4D arrays

2015-12-01 Thread Peter Otten
jorge.conr...@cptec.inpe.br wrote: > I use the IDL but now I'm change to PYTHON. I have a 4D array (time, > level,lon,lat). I would like to get a 2D array for a specific time > (time1) and level (level1). In IDL I use: 2Darray = > 4Darray(time1,level1,*,*). How can I get the 2D array in Python

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: OK, here's a patch. I reviewed the doc style guide [0] but I'm not 100% sure if I'm using the appropriate tense. There are also a couple of lines that go a bit over 80 characters, but the file already had a few of those. Am happy to make any adjustments,

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Dec 01, 2015, at 06:26 PM, Barry A. Warsaw wrote: >I'll note one other thing. Doko mentioned that in our build environment, >cPickle is built in, not an extension. Which may be relevant because in a from-hg-head build of Python 2.7, this problem doesn't

[issue25768] compileall functions do not document return values

2015-12-01 Thread Brett Cannon
Brett Cannon added the comment: Thanks, Nicholas! I'll have a look when I have a chance (hopefully no later than Friday). -- assignee: docs@python -> brett.cannon ___ Python tracker

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: And I just signed the contributor agreement. (Some banner showed up when I attached the patch to this issue asking me to do so.) -- ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: This just gets weirder. I've narrowed it down to running this command: build-static/python Lib/test/regrtest.py test_doctest test_cpickle fails every time. What's even weirder is that I hacked regrtest to print some useful information before and after each

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Peter Otten
Steven D'Aprano wrote: > and your code will break. Better and safer is: > > > def main(): # parse the args and call whatever function was selected > args = parser.parse_args(sys.argv[1:]) > try: > func = args.func > except AttributeError as err: >

[issue25735] math.factorial doc should mention integer return type

2015-12-01 Thread Sonali Gupta
Sonali Gupta added the comment: States that math.factorial(x) returns x factorial as an integer. -- keywords: +patch nosy: +mine0901 Added file: http://bugs.python.org/file41206/bug.patch ___ Python tracker

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: "keywords" is unusual name. The most used name for the dict of keyword arguments is "kwargs". $ find Lib/ -name '*.py' -exec egrep -ho '\*\*[a-zA-Z_0-9]+' '{}' + | sort | uniq -c | sort -nr | head 803 **kwargs 442 **kw 244 **kwds ... If you

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Joe Jevnik
Joe Jevnik added the comment: I only want this feature to keep the usage close to functools.partial. I was actually sort of surprised to see that mutation of the dict held in partial, but I would rather be consistent. -- ___ Python tracker

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-01 Thread Martin Panter
Martin Panter added the comment: Now I have a deeper understanding I think this can be handled separately to Issue 16217. This patch pulls together my previous two patches, and adds a fix. There are two aspects of my fix: 1. Import the package before calling find_spec() on the __main__

[issue19771] runpy should check ImportError.name before wrapping it

2015-12-01 Thread Martin Panter
Martin Panter added the comment: My new patch for Issue 14285 should avoid the main problem. However there would still be at least one leftover minor fix worth appyling: fix the exception message to use type(ex).__name__, not repr(type(ex)). -- dependencies: +Traceback wrong on

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Ian Kelly
On Dec 1, 2015 1:36 PM, "Rick Johnson" wrote: > > On Tuesday, December 1, 2015 at 1:55:59 AM UTC-6, Steven D'Aprano wrote: > > Python was never intended to be "merely" a teaching language. I think > > Guido's original vision was for it to be a glue language

Re: python response slow when running external DLL

2015-12-01 Thread jfong
Peter Otten at 2015/12/1 UTC+8 7:01:55PM wrote: > While the var_status.set() invoked from the second thread modifies some > internal data the main thread could kick in and modify (parts of) that same > data, thus bringing tkinter into an broken state. A simple example that > demonstrates the

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-01 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file41205/internal-error.patch ___ Python tracker ___

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: Martin, your patch looks good to me, and is at the very least an improvement over the status quo (which clearly traps exceptions that it shouldn't), so I'd say go ahead and apply it. Thanks for digging into this and figuring out a clean solution. --

Re: Is Microsoft Windows secretly downloading childporn to your computer ?!

2015-12-01 Thread Steve Hayes
On Tue, 1 Dec 2015 03:19:39 +0100, "Skybuck Flying" wrote: >Hello, > >The question is: > >Is Microsoft Windows secretly downloading childporn to your computer ?! You download things FROM a computer, you upload them TO a computer. Since you don't even know that much

Re: Generate config file from template using Python search and replace.

2015-12-01 Thread Mr Zaug
Ye, this does work. Many thanks! filename = "{NNN}_{BRAND}_farm.any".format(BRAND=brand, NNN=nnn) with open(filename, "w") as outstream: outstream.write(data) -- https://mail.python.org/mailman/listinfo/python-list

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Barry. Running test_cpickle after test_doctest I now can reproduce the problem in a from-hg-head build of Python 2.7. -- ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Dec 01, 2015, at 06:47 PM, Serhiy Storchaka wrote: >Thanks Barry. Running test_cpickle after test_doctest I now can reproduce the >problem in a from-hg-head build of Python 2.7. That's interesting because I can't! (Neither from the 2.7.11rc1 tarball.)

activestate recipe for code to source and back fails on 3.3+, core Python bug?

2015-12-01 Thread Mark Lawrence
The recipe in question is here http://code.activestate.com/recipes/578353-code-to-source-and-back. I've called it c2sab in the test code below. The problem is that the class name gets dropped during the round trip, but only if a list, dict or set comprehension or a generator expression is

Re: "Downloading"

2015-12-01 Thread Random832
On 2015-12-01, Steve Hayes wrote: > You download things FROM a computer, you upload them TO a computer. I'm a little bit confused as to what kinds of file transfers you think don't have at least two endpoints. -- https://mail.python.org/mailman/listinfo/python-list

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, sorry, I missed and mislead you. My tests were specially hacked to simulate a bug (sys.modules['copy_reg'] = object()). No, actually I can't reproduce it. -- ___ Python tracker

Re: Is Microsoft Windows secretly downloading childporn to your computer ?!

2015-12-01 Thread Keith Thompson
Steve Hayes writes: > On Tue, 1 Dec 2015 03:19:39 +0100, "Skybuck Flying" > wrote: >>The question is: >> >>Is Microsoft [snip] > > You download things FROM a computer, you upload them TO a computer. > > Since you don't even know that much about

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I added cPickle to Modules/Setup.local and rebuilt from hg. cPickle's a built-in but I still can't reproduce the problem. -- ___ Python tracker

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: :thumbsup: Take your time. -- ___ Python tracker ___ ___ Python-bugs-list

[issue25775] Bug tracker emails go to spam

2015-12-01 Thread Nicholas Chammas
New submission from Nicholas Chammas: Not sure where to report this. Is there a component for the bug tracker itself? Anyway, Gmail sends emails from this bug tracker to spam and flags each one with the following message: > Why is this message in Spam? It is in violation of Google's

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: Oh derp. It appears this is dup of issue24386. Apologies. -- status: open -> closed ___ Python tracker ___

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: Whoops, wrong issue. Reopening. -- status: closed -> open ___ Python tracker ___

[issue25775] Bug tracker emails go to spam

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: Oh derp. It appears this is dup of issue24386. Apologies. -- status: open -> closed ___ Python tracker ___

[issue25775] Bug tracker emails go to spam

2015-12-01 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> resolved superseder: -> Bug Tracker emails going to gmail spam ___ Python tracker

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi, I just tried your patch with the last revision and I have an error with the tests. stephane@sg1 ~/s/h/cpython> ./python -m test test_operator [1/1] test_operator Fatal Python error: ./Modules/_operator.c:975 object at 0x7ff804c2e3d8 has negative ref

Re: static variables

2015-12-01 Thread Grobu
Perhaps you could use a parameter's default value to implement your static variable? Like : # - >>> def test(arg=[0]): ... print arg[0] ... arg[0] += 1 ... >>> test() 0 >>> test() 1 # - --

Re: static variables

2015-12-01 Thread Ulli Horlacher
Steven D'Aprano wrote: > A better and more general test is: > > if hasattr(a, 'x'): print('attribute of a') Fine! I have now: def a(x=None): if not hasattr(a,'x'): a.x = 0 a.x += 1 print('%d:' % a.x,x) This simply counts the calls of a() But, when I rename the

python CN domain and keyword

2015-12-01 Thread Ian Liu
(Please forward this to your CEO, because this is urgent. Thanks) We are a Network Service Company which is the domain name registration center in Shanghai, China. On Nov 30, 2015, we received an application from Huasu Holdings Ltd requested "python" as their internet keyword and China (CN)

Re: Is Microsoft Windows secretly downloading childporn to your computer ?!

2015-12-01 Thread trolling tone
On 01.12.2015 03:19, Skybuck Flying wrote: Hello, The question is: Is Microsoft Windows secretly downloading childporn to your computer ?! How can you be sure ? It's closed source software. It's downloading all kinds of crap via Windows Update. Having childporn on your computer is a crime

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Manolo Martínez
On 12/01/15 at 12:00pm, Steven D'Aprano wrote: > I'm trying to understand why vars() exists. Does anyone use it? Well, I have this little podcast aggregator (https://github.com/manolomartinez/greg) that I and a bunch of other people use. I started writing it some years ago, and the code is a bit

Re: static variables

2015-12-01 Thread Peter Otten
Ulli Horlacher wrote: > Steven D'Aprano wrote: > >> A better and more general test is: >> >> if hasattr(a, 'x'): print('attribute of a') > > Fine! > > I have now: > > def a(x=None): > if not hasattr(a,'x'): a.x = 0 > a.x += 1 > print('%d:' % a.x,x) > > This

Re: [Pylint-dev] Pylint 1.5.0 / Astroid 1.4.1 released

2015-12-01 Thread Sylvain Thénault
On 01 décembre 01:42, Claudiu Popa wrote: > Hello, Hi Claudiu, > I'm happy to announce you the release of Pylint 1.5.0, > respectively Astroid 1.4.1. > > It's been over a year since the last major release > and the amount of changes that were brought into pylint > in this time is humongous,

Re: Is Microsoft Windows secretly downloading childporn to your computer ?!

2015-12-01 Thread Juha Nieminen
In comp.lang.c++ Skybuck Flying wrote: > Is Microsoft Windows secretly downloading childporn to your computer ?! No, because Microsoft is too smart to commit economical suicide. If a troyan/virus is doing so, that's not on Microsoft. --- news://freenews.netfront.net/ -

[issue25772] Misleading descriptions about built-in type `super.`

2015-12-01 Thread Martin Panter
Martin Panter added the comment: I agree. I think Issue 23674 already covers this. I will try to propose some changes there. -- nosy: +martin.panter resolution: -> duplicate status: open -> closed superseder: -> super() documentation isn't very clear

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: http://buildbot.python.org/all/builders/PPC64LE%20Fedora%202.7/builds/164/steps/test/logs/stdio Failed a number of tests that directly or indirectly use copy_reg. First failed test is test_cpickle. -- title: test regressions introduced with the fix

Re: static variables

2015-12-01 Thread Wolfgang Maier
On 01.12.2015 09:26, Ulli Horlacher wrote: Steven D'Aprano wrote: A better and more general test is: if hasattr(a, 'x'): print('attribute of a') Fine! I have now: def a(x=None): if not hasattr(a,'x'): a.x = 0 a.x += 1 print('%d:' % a.x,x) This simply counts

python domain in China. This showed up on Python list

2015-12-01 Thread Laura Creighton
I think we have just dodged a bullet, let us now go thank the nice people who sent us this and figure out how we should secure the domain. Laura --- Forwarded Message Return-Path: Date: Tue, 1 Dec 2015 15:12:58 +0800 From: "Ian Liu"

[issue25772] Misleading descriptions about built-in type `super.`

2015-12-01 Thread Juchen Zeng
New submission from Juchen Zeng: A few days ago, I was learning built-in type `super` through [python official doc](https://docs.python.org/2/library/functions.html#super). And I was mislead by its documentation, in the part of how `__mro__` resolution works. Below is the part which confuse

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Steven D'Aprano
On Tuesday 01 December 2015 18:22, eryk sun wrote: > On Mon, Nov 30, 2015 at 7:00 PM, Steven D'Aprano > wrote: >> Either way, vars() doesn't solve the problem. What problem does it solve? > > vars() used to be the way to list local variables. Oh, snap! Nice bit of

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Steven D'Aprano
On Tuesday 01 December 2015 16:54, Rick Johnson wrote: > On Monday, November 30, 2015 at 7:01:14 PM UTC-6, Steven D'Aprano wrote: >> I'm trying to understand why vars() exists. Does anyone use it? > > I think your "mental dilemma" stems from the fact that python was > originally created to be an

Re: python domain in China. This showed up on Python list

2015-12-01 Thread Michiel Overtoom
Hi, > On 01 Dec 2015, at 11:10, Laura Creighton wrote: > > I think we have just dodged a bullet, let us now go thank the > nice people who sent us this and figure out how we should > secure the domain. I received exactly the same email a while ago, claiming that someone was

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread Peter Otten
Manolo Martínez wrote: > On 12/01/15 at 12:00pm, Steven D'Aprano wrote: > > I'm trying to understand why vars() exists. Does anyone use it? > > Well, I have this little podcast aggregator > (https://github.com/manolomartinez/greg) that I and a bunch of other > people use. I started writing it

Re: Generate config file from template using Python search and replace.

2015-12-01 Thread Peter Otten
Mr Zaug wrote: > On Monday, November 30, 2015 at 4:14:48 AM UTC-5, Peter Otten wrote: >> Mr Zaug wrote: >> >> > On Sunday, November 29, 2015 at 5:50:51 PM UTC-5, Peter Otten wrote: >> >> Mr Zaug wrote: >> >> >> >> > When I run this script on OS X El Capitan, I see, >> >> > >> >> > #

Re: python domain in China. This showed up on Python list

2015-12-01 Thread Chris Rebert
On Tue, Dec 1, 2015 at 2:10 AM, Laura Creighton wrote: > I think we have just dodged a bullet, let us now go thank the > nice people who sent us this and figure out how we should > secure the domain. > > Laura > > > --- Forwarded Message > > Return-Path:

  1   2   >