Re: Python 3 is killing Python

2014-08-02 Thread Glenn Linderman
On 7/16/2014 7:27 AM, Frank Millman wrote: I just tried an experiment in my own project. Ned Batchelder, in his Pragmatic Unicode presentation, http://nedbatchelder.com/text/unipain.html, suggests that you always have some unicode characters in your data, just to ensure that they are handled

Re: Dict when defining not returning multi value key error

2014-08-02 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: On Sat, Aug 2, 2014 at 7:42 AM, Terry Reedy tjre...@udel.edu wrote: For mercurial, with no treat model, a 160 bit hash is used. Internet applications need more bits and carefully vetted algorithms to hopefully make the actual principle true. Ditto git,

3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Mark Summerfield
Last week I spent a couple of days teaching two children (10 and 13 -- too big an age gap!) how to do some turtle graphics with Python. Neither had programmed Python before -- one is a Minecraft ace and the other had done Scratch. Suggestion #1: Make IDLE start in the user's home directory.

Re: Dict when defining not returning multi value key error

2014-08-02 Thread Marko Rauhamaa
Marko Rauhamaa ma...@pacujo.net: Important systems absolutely rely on the fact that the hashes can be used for identification. They are not just checksums. They are not double-checked with bit-to-bit comparisons of the actual data. And in fact, you can use the principle in Python: class

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Marko Rauhamaa
Mark Summerfield l...@qtrac.plus.com: Suggestion #1: Make IDLE start in the user's home directory. Suggestion #2: Make all the turtle examples begin from turtle import * so no leading turtle. is needed in the examples. Suggestion #3: Make object(key=value, ...) legal and equiv of

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-02 Thread Olaf Hering
On Sat, Aug 02, Gregory Ewing wrote: MacOSX doesn't currently have an automatic dependency manager, but if it did, things would still be a lot neater and tidier than they are in Linux or Windows, where what is conceptually a single object (a package) gets split up and its parts scattered

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Mark Summerfield
On Saturday, 2 August 2014 08:14:08 UTC+1, Marko Rauhamaa wrote: Mark Summerfield: Suggestion #1: Make IDLE start in the user's home directory. Suggestion #2: Make all the turtle examples begin from turtle import * so no leading turtle. is needed in the examples. Suggestion #3: Make

Re: eval [was Re: dict to boolean expression, how to?]

2014-08-02 Thread Peter Otten
Steven D'Aprano wrote: On Fri, 01 Aug 2014 17:44:27 +0200, Peter Otten wrote: [...] bool = ((df['a'] == 1) (df['A'] == 0) | (df['b'] == 1) (df['B'] == 0) | (df['c'] == 1) (df['C'] == 0)) This is how it might look without eval(): #untested result =

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Mark Lawrence
On 02/08/2014 07:45, Mark Summerfield wrote: Last week I spent a couple of days teaching two children (10 and 13 -- too big an age gap!) how to do some turtle graphics with Python. Neither had programmed Python before -- one is a Minecraft ace and the other had done Scratch. Suggestion #1:

Re: eval [was Re: dict to boolean expression, how to?]

2014-08-02 Thread Mark Lawrence
On 02/08/2014 03:59, Steven D'Aprano wrote: My refactoring, with the bare minimum use of exec necessary: https://code.activestate.com/recipes/578918-yet-another-namedtuple/ FTR I get the feed of new recipes from gwene.com.activestate.code.feeds.recipes.langs.python from news.gmane.org.

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Marko Rauhamaa
Mark Summerfield l...@qtrac.plus.com: object() returns a minimal featureless object with no dictionary (no __dict__ attribute). This makes sense for efficiency since not all objects need a dictionary. __setattr__ could create __dict__ belatedly. Marko --

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Mark Summerfield
On Saturday, 2 August 2014 08:46:04 UTC+1, Mark Lawrence wrote: On 02/08/2014 07:45, Mark Summerfield wrote: [snip] Suggestion #1: Make IDLE start in the user's home directory. Entirely agree. Please raise an enhancement request on the bug tracker if there isn't already one. Done:

Re: Bug with help (was Re: Getting a list of all modules)

2014-08-02 Thread Heinz Schmitz
Akira Li wrote: Look at how `help('modules')` is implemented. Though it crashes on my system. Have you reported this at bugs.python.org or is there already an issue for the problem that you see? It is this issue for python2.7: https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/896836

Re: Dict when defining not returning multi value key error

2014-08-02 Thread Chris Angelico
On Sat, Aug 2, 2014 at 4:41 PM, Marko Rauhamaa ma...@pacujo.net wrote: I don't know why you way hg and git have no threat models. A great deal of damage could be inflicted if you could sneak malicious edits into version control systems without altering the hash. You would have to somehow push

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-02 Thread Gregory Ewing
Chris Angelico wrote: The easier target for the mouse argument is valuable ONLY when you use the mouse to access the menu bar. If you use the keyboard (and take advantage of mnemonic letters), it's much more useful to have the menu bar attached to its window. Seems to me that if you use the

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-02 Thread Gregory Ewing
Olaf Hering wrote: How does a package differ? Its a package here and there. Just use the correct tools to inspect a package, like 'rpm -qliv $package' to see what a package is all about. Splitting the package up creates a problem, which you then need to invent a special tool to solve. Seems to

Re: Dict when defining not returning multi value key error

2014-08-02 Thread Ned Batchelder
On 8/1/14 10:30 AM, Ian Kelly wrote: On Thu, Jul 31, 2014 at 9:28 PM, Terry Reedy tjre...@udel.edu wrote: On 7/31/2014 5:15 PM, Ian Kelly wrote: On Thu, Jul 31, 2014 at 5:24 AM, Dilu Sasidharan dilu.se...@gmail.com wrote: Hi, I am wondering why the dictionary in python not returning multi

Re: Bug with help (was Re: Getting a list of all modules)

2014-08-02 Thread Robert Kern
On 2014-08-02 09:33, Heinz Schmitz wrote: Akira Li wrote: Look at how `help('modules')` is implemented. Though it crashes on my system. Have you reported this at bugs.python.org or is there already an issue for the problem that you see? It is this issue for python2.7:

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-02 Thread Chris Angelico
On Sat, Aug 2, 2014 at 9:33 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Chris Angelico wrote: The easier target for the mouse argument is valuable ONLY when you use the mouse to access the menu bar. If you use the keyboard (and take advantage of mnemonic letters), it's much more

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-02 Thread MRAB
On 2014-08-02 01:00, Gregory Ewing wrote: MRAB wrote: [snip] And don't mention the menu bar across the top, separated from the window to which it belonged. That seems to be a matter of taste. There are some advantages to the menu-bar-at-top model. It's an easier target to hit, because you

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-02 Thread Roy Smith
In article c42o1nfbrq...@mid.individual.net, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: And don't mention the menu bar across the top, separated from the window to which it belonged. That seems to be a matter of taste. There are some advantages to the menu-bar-at-top model. It's an

Tkinter grid autosize help

2014-08-02 Thread Nicholas Cannon
So i have a basic calculator program and i have a label that i want to go across the top to show the numbers and stuff like on a normal calculator. The only way i can make the buttons look neat and then when i keep pressing one the label gets larger and then half the buttons move out of the

Re: Tkinter grid autosize help

2014-08-02 Thread MRAB
On 2014-08-02 15:38, Nicholas Cannon wrote: So i have a basic calculator program and i have a label that i want to go across the top to show the numbers and stuff like on a normal calculator. The only way i can make the buttons look neat and then when i keep pressing one the label gets larger

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Steven D'Aprano
Marko Rauhamaa wrote: Expanding #3: o = object() o.x = 3 Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'object' object has no attribute 'x' Why? There are two intended uses for object and its instances: - as the base class for all

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Steven D'Aprano
Marko Rauhamaa wrote: Mark Summerfield l...@qtrac.plus.com: object() returns a minimal featureless object with no dictionary (no __dict__ attribute). This makes sense for efficiency since not all objects need a dictionary. __setattr__ could create __dict__ belatedly. Are we designing

Re: Tkinter grid autosize help

2014-08-02 Thread Mark Lawrence
On 02/08/2014 15:38, Nicholas Cannon wrote: So i have a basic calculator program and i have a label that i want to go across the top to show the numbers and stuff like on a normal calculator. The only way i can make the buttons look neat and then when i keep pressing one the label gets larger

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Marko Rauhamaa
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: Marko Rauhamaa wrote: __setattr__ could create __dict__ belatedly. Are we designing Son Of PHP, or a sensible language? *wink* If object.__setattr__ did this, then we're left with two equally horrible choices: Not a huge issue. Only

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Mark Lawrence
On 02/08/2014 18:07, Marko Rauhamaa wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: Marko Rauhamaa wrote: __setattr__ could create __dict__ belatedly. Are we designing Son Of PHP, or a sensible language? *wink* If object.__setattr__ did this, then we're left with two equally

Re: Bug with help (was Re: Getting a list of all modules)

2014-08-02 Thread Terry Reedy
On 8/2/2014 8:13 AM, Robert Kern wrote: On 2014-08-02 09:33, Heinz Schmitz wrote: Akira Li wrote: Look at how `help('modules')` is implemented. Though it crashes on my system. Have you reported this at bugs.python.org or is there already an issue for the problem that you see? It is this

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Marko Rauhamaa
Mark Lawrence breamore...@yahoo.co.uk: On 02/08/2014 18:07, Marko Rauhamaa wrote: And the newest Python releases let you replace that with: import types Object = types.SimpleNamespace With the latter being part of suggestion #3 in the original post. Not quite. Even though Sugg. #3

Correct type for a simple “bag of attributes” namespace object (was: 3 Suggestions to Make Python Easier For Children)

2014-08-02 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: If you need instances which carry state, then object is the wrong class. Right. The ‘types’ module provides a SimpleNamespace class for the common “bag of attributes” use case:: import types foo = types.SimpleNamespace()

Re: Correct type for a simple bag of attributes namespace object (was: 3 Suggestions to Make Python Easier For Children)

2014-08-02 Thread Mark Summerfield
On Saturday, 2 August 2014 20:58:59 UTC+1, Ben Finney wrote: Steven D'Aprano writes: If you need instances which carry state, then object is the wrong class. Fair enough. Right. The 'types' module provides a SimpleNamespace class for the common bag of attributes use case::

Re: Correct type for a simple bag of attributes namespace object (was: 3 Suggestions to Make Python Easier For Children)

2014-08-02 Thread Chris Angelico
On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield l...@qtrac.plus.com wrote: But perhaps what I should be asking for is for a new built-in that does what types.SimpleNamespace() does, so that without any import you can write, say, foo = namespace(a=1, b=2) # or bar = namespace() bar.a = 1

Re: Getting a list of all modules

2014-08-02 Thread jonnicoll11
On Friday, 1 August 2014 16:41:41 UTC+1, Steven D'Aprano wrote: On Fri, 01 Aug 2014 14:39:09 +0100, Robert Kern wrote: Take a look at what has already been implemented in IPython: https://github.com/ipython/ipython/blob/master/IPython/core/ completerlib.py#L208

Re: Correct type for a simple bag of attributes namespace object

2014-08-02 Thread Mark Lawrence
On 02/08/2014 22:05, Chris Angelico wrote: On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield l...@qtrac.plus.com wrote: But perhaps what I should be asking for is for a new built-in that does what types.SimpleNamespace() does, so that without any import you can write, say, foo = namespace(a=1,

Re: Getting a list of all modules

2014-08-02 Thread Mark Lawrence
On 02/08/2014 22:13, jonnicol...@googlemail.com wrote: On Friday, 1 August 2014 16:41:41 UTC+1, Steven D'Aprano wrote: On Fri, 01 Aug 2014 14:39:09 +0100, Robert Kern wrote: Take a look at what has already been implemented in IPython:

Re: Correct type for a simple bag of attributes namespace object

2014-08-02 Thread Chris Angelico
On Sun, Aug 3, 2014 at 7:16 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: I'd forgotten all about site.py so went to the 3.4.1 docs and found Deprecated since version 3.4: Support for the “site-python” directory will be removed in 3.5.. Plan B? :) Oh. Hrm. I've no idea... but I'm sure

Re: Correct type for a simple bag of attributes namespace object

2014-08-02 Thread Mark Lawrence
On 02/08/2014 22:16, Mark Lawrence wrote: On 02/08/2014 22:05, Chris Angelico wrote: On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield l...@qtrac.plus.com wrote: But perhaps what I should be asking for is for a new built-in that does what types.SimpleNamespace() does, so that without any import

Python Programing for the Absoulte Beginner

2014-08-02 Thread Seymore4Head
https://www.google.com/webhp?hl=entab=wwgws_rd=ssl#hl=enq=python+programing+for+the+absolute+beginner There is a book listed as a PDF. When I try the first example of print Game Over I get a syntax error. I have tried running the command line and the GUI. I get the feeling there is something

Re: Python Programing for the Absoulte Beginner

2014-08-02 Thread Chris Angelico
On Sun, Aug 3, 2014 at 8:13 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: https://www.google.com/webhp?hl=entab=wwgws_rd=ssl#hl=enq=python+programing+for+the+absolute+beginner There is a book listed as a PDF. When I try the first example of print Game Over I get a syntax error. I

Re: Python Programing for the Absoulte Beginner

2014-08-02 Thread Mark Lawrence
On 02/08/2014 23:13, Seymore4Head wrote: https://www.google.com/webhp?hl=entab=wwgws_rd=ssl#hl=enq=python+programing+for+the+absolute+beginner There is a book listed as a PDF. When I try the first example of print Game Over I get a syntax error. I have tried running the command line and the

Re: Python Programing for the Absoulte Beginner

2014-08-02 Thread Seymore4Head
On Sun, 3 Aug 2014 08:30:15 +1000, Chris Angelico ros...@gmail.com wrote: On Sun, Aug 3, 2014 at 8:13 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: https://www.google.com/webhp?hl=entab=wwgws_rd=ssl#hl=enq=python+programing+for+the+absolute+beginner There is a book listed as a PDF.

Re: Python Programing for the Absoulte Beginner

2014-08-02 Thread Seymore4Head
On Sat, 02 Aug 2014 23:31:35 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 02/08/2014 23:13, Seymore4Head wrote: https://www.google.com/webhp?hl=entab=wwgws_rd=ssl#hl=enq=python+programing+for+the+absolute+beginner There is a book listed as a PDF. When I try the first example of

Re: Tkinter grid autosize help

2014-08-02 Thread Nicholas Cannon
On Saturday, August 2, 2014 10:38:28 PM UTC+8, Nicholas Cannon wrote: So i have a basic calculator program and i have a label that i want to go across the top to show the numbers and stuff like on a normal calculator. The only way i can make the buttons look neat and then when i keep pressing

Re: Python Programing for the Absoulte Beginner

2014-08-02 Thread Chris Angelico
On Sun, Aug 3, 2014 at 8:41 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: If the book is for Python 2 and you have 3.3 it should be print(Game Over) Thanks I am sure they had a good reason to add using 2 more characters for doing the same job. One more, since you'll normally have a

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Terry Reedy
On 8/2/2014 3:46 AM, Mark Lawrence wrote: On 02/08/2014 07:45, Mark Summerfield wrote: Last week I spent a couple of days teaching two children (10 and 13 -- too big an age gap!) how to do some turtle graphics with Python. Neither had programmed Python before -- one is a Minecraft ace and the

From git to hg

2014-08-02 Thread Demian Brecht
For gits looking to transition to hg (namely to work on cpython): http://demianbrecht.github.io/vcs/2014/07/31/from-git-to-hg/. My learnings beginning to work with mercurial while working on the stdlib. (This was sent out to core-mentorship already, just figured this is likely a larger audience

Re: Correct type for a simple bag of attributes namespace object (was: 3 Suggestions to Make Python Easier For Children)

2014-08-02 Thread Devin Jeanpierre
On Sat, Aug 2, 2014 at 2:05 PM, Chris Angelico ros...@gmail.com wrote: On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield l...@qtrac.plus.com wrote: Naturally, I understand that adding a new name is a big deal and may be too much to ask for beginners. This is where you might want to consider

Re: 3 Suggestions to Make Python Easier For Children

2014-08-02 Thread Terry Reedy
On 8/2/2014 4:03 AM, Mark Summerfield wrote: On Saturday, 2 August 2014 08:46:04 UTC+1, Mark Lawrence wrote: On 02/08/2014 07:45, Mark Summerfield wrote: Summarizing my responses on the tracker... Suggestion #1: Make IDLE start in the user's home directory. Entirely agree. Please raise

Re: Correct type for a simple bag of attributes namespace object (was: 3 Suggestions to Make Python Easier For Children)

2014-08-02 Thread Chris Angelico
On Sun, Aug 3, 2014 at 9:18 AM, Devin Jeanpierre jeanpierr...@gmail.com wrote: On Sat, Aug 2, 2014 at 2:05 PM, Chris Angelico ros...@gmail.com wrote: On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield l...@qtrac.plus.com wrote: Naturally, I understand that adding a new name is a big deal and may

Re: From git to hg

2014-08-02 Thread Chris Angelico
On Sun, Aug 3, 2014 at 9:04 AM, Demian Brecht demianbre...@gmail.com wrote: For gits looking to transition to hg (namely to work on cpython): http://demianbrecht.github.io/vcs/2014/07/31/from-git-to-hg/. My learnings beginning to work with mercurial while working on the stdlib. (This was

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-02 Thread Gregory Ewing
MRAB wrote: RISC OS didn't have a menu bar at the top of each window either; its menus were all pop-up. You didn't have to keep flicking the mouse at all! The main reason for having a menu bar is discoverability. The idea is that you can browse through the menus and get a feel for what

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-02 Thread Gregory Ewing
Chris Angelico wrote: It's a little awkward when you have an invoicing screen and you put something like PO Shipping as your customer name, and suddenly Alt-O takes you someplace different. An app that did that would be seriously broken, wouldn't it? The should only be interpreted that way in

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-02 Thread Gregory Ewing
Roy Smith wrote: These days, I'm running multiple 24 inch monitors. The single menu bar paradigm starts to break down in an environment like that. Yes, that's an issue. However, even on a large screen, most of my windows are at least half a screen high, putting their tops a considerable

Re: Correct type for a simple bag of attributes namespace object (was: 3 Suggestions to Make Python Easier For Children)

2014-08-02 Thread Ian Kelly
On Sat, Aug 2, 2014 at 2:46 PM, Mark Summerfield l...@qtrac.plus.com wrote: On Saturday, 2 August 2014 20:58:59 UTC+1, Ben Finney wrote: Steven D'Aprano writes: If you need instances which carry state, then object is the wrong class. Fair enough. Right. The 'types' module provides a

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-02 Thread Chris Angelico
On Sun, Aug 3, 2014 at 10:01 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Chris Angelico wrote: It's a little awkward when you have an invoicing screen and you put something like PO Shipping as your customer name, and suddenly Alt-O takes you someplace different. An app that did

Re: Tkinter grid autosize help

2014-08-02 Thread Terry Reedy
On 8/2/2014 6:53 PM, Nicholas Cannon wrote: On Saturday, August 2, 2014 10:38:28 PM UTC+8, Nicholas Cannon wrote: So i have a basic calculator program and i have a label that i want to go across the top to show the numbers and stuff like on a normal calculator. The buttons are labelled

Re: Tkinter grid autosize help

2014-08-02 Thread Rick Johnson
On Saturday, August 2, 2014 5:53:12 PM UTC-5, Nicholas Cannon wrote: So i have a basic calculator program and i have a label that i want to go across the top to show the numbers and stuff like on a normal calculator. The only way i can make the buttons look neat and then when i keep pressing

Re: Tkinter grid autosize help

2014-08-02 Thread Nicholas Cannon
On Saturday, August 2, 2014 10:38:28 PM UTC+8, Nicholas Cannon wrote: So i have a basic calculator program and i have a label that i want to go across the top to show the numbers and stuff like on a normal calculator. The only way i can make the buttons look neat and then when i keep pressing

Re: Correct type for a simple bag of attributes namespace object

2014-08-02 Thread Terry Reedy
On 8/2/2014 5:16 PM, Mark Lawrence wrote: On 02/08/2014 22:05, Chris Angelico wrote: On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield l...@qtrac.plus.com wrote: But perhaps what I should be asking for is for a new built-in that does what types.SimpleNamespace() does, so that without any import

Re: Correct type for a simple bag of attributes namespace object

2014-08-02 Thread Terry Reedy
On 8/2/2014 8:59 PM, Ian Kelly wrote: On Sat, Aug 2, 2014 at 2:46 PM, Mark Summerfield l...@qtrac.plus.com wrote: On Saturday, 2 August 2014 20:58:59 UTC+1, Ben Finney wrote: Steven D'Aprano writes: If you need instances which carry state, then object is the wrong class. Fair enough.

Re: Tkinter grid autosize help

2014-08-02 Thread Terry Reedy
On 8/2/2014 10:16 PM, Terry Reedy wrote: On 8/2/2014 6:53 PM, Nicholas Cannon wrote: The only way i can make the buttons look neat and then when i keep pressing one the label gets larger and then half the buttons move out of the screen With my code below, I tried entering a 20 digit

Re: Python Programing for the Absoulte Beginner

2014-08-02 Thread Steve Hayes
On Sun, 3 Aug 2014 08:30:15 +1000, Chris Angelico ros...@gmail.com wrote: On Sun, Aug 3, 2014 at 8:13 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: https://www.google.com/webhp?hl=entab=wwgws_rd=ssl#hl=enq=python+programing+for+the+absolute+beginner There is a book listed as a PDF.

Re: Python Programing for the Absoulte Beginner

2014-08-02 Thread Chris Angelico
On Sun, Aug 3, 2014 at 3:11 PM, Steve Hayes hayes...@telkomsa.net wrote: You're looking at a Python 2 book, and you're running Python 3. I would recommend instead getting a Python 3 tutorial: Or do as I did, and install Python 2. Better to install and learn Python 3. Much better. ChrisA --

Re: Python Programing for the Absoulte Beginner

2014-08-02 Thread Steve Hayes
On Sun, 3 Aug 2014 15:12:02 +1000, Chris Angelico ros...@gmail.com wrote: On Sun, Aug 3, 2014 at 3:11 PM, Steve Hayes hayes...@telkomsa.net wrote: You're looking at a Python 2 book, and you're running Python 3. I would recommend instead getting a Python 3 tutorial: Or do as I did, and install

Re: Python Programing for the Absoulte Beginner

2014-08-02 Thread memilanuk
On 08/02/2014 10:20 PM, Steve Hayes wrote: there are no books available on Python 3 (I don't regard downloadable PDFs or other onlines stuff as books). That's a very broad... and very *wrong* statement. -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com --

Re: Python Programing for the Absoulte Beginner

2014-08-02 Thread Chris Angelico
On Sun, Aug 3, 2014 at 3:20 PM, Steve Hayes hayes...@telkomsa.net wrote: On Sun, 3 Aug 2014 15:12:02 +1000, Chris Angelico ros...@gmail.com wrote: On Sun, Aug 3, 2014 at 3:11 PM, Steve Hayes hayes...@telkomsa.net wrote: You're looking at a Python 2 book, and you're running Python 3. I would

[issue22107] tempfile module misinterprets access denied error on Windows

2014-08-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- type: - behavior versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22107 ___

[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Mark Summerfield
New submission from Mark Summerfield: On Windows IDLE's working directory is Python's install directory, e.g., C:\Python34. ISTM that this is the wrong directory for 99% of general users and for 100% of beginners since this is _not_ the directory where people should save their own .py files

[issue22122] turtle module examples should all begin from turtle import *

2014-08-02 Thread Mark Summerfield
New submission from Mark Summerfield: The turtle module is aimed primarily at young beginners to Python. Making them type turtle.this and turtle.that all over the place is tedious and unhelpful. At the start of the turtle docs there's a nice example that begins from turtle import * and the

[issue22116] Weak reference support for C function objects

2014-08-02 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22116 ___ ___

[issue22123] Make object() behave exactly like types.SimpleNamespace() if given kwargs

2014-08-02 Thread Mark Summerfield
New submission from Mark Summerfield: Right now object() does not accept any args and returns the lightest possible featureless object (i.e., without even a __dict__). This is great. However, it is really useful sometimes to be able to create an object to hold some editable state (so not a

[issue22120] Fix compiler warnings

2014-08-02 Thread STINNER Victor
STINNER Victor added the comment: It would be better to only modify clinic for unsigned types, but how do you check if a type is signed or not? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22120

[issue22116] Weak reference support for C function objects

2014-08-02 Thread Stefan Behnel
Stefan Behnel added the comment: FWIW, functions in Cython (which C-level-inherit from PyCFunction) support weak references just fine. Adding that as a general feature to PyCFunction sounds like the right thing to do. -- nosy: +scoder ___ Python

[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars

2014-08-02 Thread Daniel Eriksson
Daniel Eriksson added the comment: Added Matt Behrens test to Lars Gustäbel 2.7 version. -- nosy: +dan...@starstable.com Added file: http://bugs.python.org/file36202/issue21987_py2.7_with_test.patch ___ Python tracker rep...@bugs.python.org

[issue22120] Fix compiler warnings

2014-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Either override render() for unsigned type converters, or add new converter attribute (in additional to type, cast, conversion_fn, etc). -- ___ Python tracker rep...@bugs.python.org

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-08-02 Thread Daniel Eriksson
Daniel Eriksson added the comment: Tested and it works fine on CentOS 6.4 in 2.7, 3.4 and 3.5 -- nosy: +dan...@starstable.com, ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827

[issue19996] httplib infinite read on invalid header

2014-08-02 Thread Jason Robinson
Jason Robinson added the comment: I took the patches and verified that; * running the new tests without the changed code in Lib/email/feedparser.py (head) and Lib/httplib.py, Lib/rfc822.py (2.7) fails both the new tests. * running the new tests with the changed code passes the tests (on both

[issue21697] shutil.copytree() handles symbolic directory incorrectly

2014-08-02 Thread Daniel Eriksson
Daniel Eriksson added the comment: I have tested both patches on CentOS 6.4 and Eduardo Seabra:s patch works correctly with symlinks=True -- nosy: +dan...@starstable.com ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21697

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-08-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've got it from here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827 ___ ___ Python-bugs-list

[issue17762] platform.linux_distribution() should honor /etc/os-release

2014-08-02 Thread Jason Robinson
Jason Robinson added the comment: platform.linux_distribution is being deprecated in 3.5 and removed in 3.6 as stated in comment http://bugs.python.org/issue1322#msg207427 in issue #1322 I'm guessing this issue should be closed when that patch is merged in? -- nosy: +jaywink

[issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '')

2014-08-02 Thread Jason Robinson
Jason Robinson added the comment: platform.linux_distribution is being deprecated in 3.5 and removed in 3.6 as stated in comment http://bugs.python.org/issue1322#msg207427 in issue #1322 I'm guessing this issue should be closed when that patch is merged in? -- nosy: +ezio.melotti,

[issue22120] Fix compiler warnings

2014-08-02 Thread Charles-François Natali
Charles-François Natali added the comment: This patch should probably be moved to its own issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22120 ___

[issue15114] Deprecate strict mode of HTMLParser

2014-08-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0e2e47c1f205 by Ezio Melotti in branch 'default': #15114: the strict mode and argument of HTMLParser, HTMLParser.error, and the HTMLParserError exception have been removed. http://hg.python.org/cpython/rev/0e2e47c1f205 --

[issue15114] Deprecate strict mode of HTMLParser

2014-08-02 Thread Ezio Melotti
Ezio Melotti added the comment: 3.5 is done. Closing. -- resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15114 ___

[issue22112] '_UnixSelectorEventLoop' object has no attribute 'create_task'

2014-08-02 Thread STINNER Victor
STINNER Victor added the comment: Here is a a patch which replaces loop.create_task(coro) with asyncio.async(coro), mention that asyncio.async() can be used to scheduler a coroutine, and make it clear that create_task() is only available in Python 3.4.2 and later. Does it look better? If

[issue20402] List comprehensions should be noted in for loop documentation

2014-08-02 Thread Alexander Grigorievskiy
Alexander Grigorievskiy added the comment: I have added some clarification following Westley Martínez recommendation. I provided references to the list comprehensions and generator expressions. I tried to make the description short. -- keywords: +patch nosy: +AlexGrig Added file:

[issue22120] Fix compiler warnings

2014-08-02 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- Removed message: http://bugs.python.org/msg224550 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22120 ___

[issue22120] Fix compiler warnings

2014-08-02 Thread STINNER Victor
STINNER Victor added the comment: Hum, I forgot the attach the most important patch: fix_warnings.patch. -- Added file: http://bugs.python.org/file36205/fix_warnings.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22120

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-02 Thread Tuikku Anttila
Tuikku Anttila added the comment: Added to the documentation of zipfile.ZipFile.read() that the method will throw a NotImplementedError when the compression scheme of the ZipFile is something else than ZIP_STORED, ZIP_DEFLATED, ZIP_BZIP2 or ZIP_LZMA. -- keywords: +patch nosy:

[issue14910] argparse: disable abbreviation

2014-08-02 Thread Daniel Eriksson
Daniel Eriksson added the comment: Update the patch - issue_14910_3.diff argparse.rst - merging conflicts -- nosy: +dan...@starstable.com Added file: http://bugs.python.org/file36207/issue_14910_3.diff ___ Python tracker rep...@bugs.python.org

[issue22116] Weak reference support for C function objects

2014-08-02 Thread Wei Wu
Wei Wu added the comment: I have made a patch related to this issue, please take a look at it. Thanks :) -- nosy: +kilowu ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22116 ___

[issue22116] Weak reference support for C function objects

2014-08-02 Thread Wei Wu
Changes by Wei Wu we...@cacheme.net: -- keywords: +patch Added file: http://bugs.python.org/file36208/22116.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22116 ___

[issue18859] README.valgrind should mention --with-valgrind

2014-08-02 Thread Sowmya
Sowmya added the comment: Hi, I have created a patch for this bug. The Misc/README.valgrind now mentions the --with-valgrind configure options. -- keywords: +patch nosy: +sowmya-ravidas type: enhancement - Added file: http://bugs.python.org/file36209/patch.diff

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: What problem does this solve? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22117 ___ ___

[issue22116] Weak reference support for C function objects

2014-08-02 Thread Stefan Behnel
Stefan Behnel added the comment: Patch looks ok. Not sure about the test dependency from test_weakref.py to _testcapi, though. Is that module allowed to be used everywhere? Wouldn't it be enough to test that one of the builtin functions is now weak referencible? len seems to be used in other

[issue21448] Email Parser use 100% CPU

2014-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Parser reads from input file small chunks (8192 churacters) and feed FeedParser which pushes data into BufferedSubFile. In BufferedSubFile.push() chunks of incomplete data are accumulated in a buffer and repeatedly scanned for newlines. Every push() has

[issue21448] Email Parser use 100% CPU

2014-08-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21448 ___ ___

[issue15907] move doctest test-data files into a subdirectory of Lib/test

2014-08-02 Thread Jason Robinson
Jason Robinson added the comment: Here is a patch that hopefully does what was intended. All the tests passed locally, hopefully the tests we're adapted correctly to the new location of the files. My first patch :) I added a new data file 'doctest_DocFileSuite_test.txt' to Lib/test to keep

[issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules

2014-08-02 Thread Evans Mungai
Evans Mungai added the comment: Backport for test_tarfile.py -- nosy: +evans.mungai versions: +Python 2.7 -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file36212/issue7944_tarfile_2_7.diff ___ Python tracker rep...@bugs.python.org

  1   2   >