Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Ian Kelly
On Sat, Jun 22, 2013 at 11:23 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 22 Jun 2013 22:27:10 -0600, Ian Kelly wrote: I actually consider that an up side. Sure it's inconvenient that you can't delegate all such methods at once just by overriding __getattribute__,

Making a pass form cgi = webpy framework

2013-06-23 Thread Νίκος
Hello, as you all know i'am using cgi method for my web script. I have been told that webpy is the way to go sor script simple enough as mines. Can you please show me the simplest example you can think of utilizing a templates (index.html) and a python script (metrites.py) ? I want to see

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Adam Jiang
* property only works in new-style classes that inherit from object; * likewise for super; Another question raised here is that what is the proper way to refer to parent class? For example, class A(object): def __init__(self, arg): print A class B(A): def

Re: n00b question on spacing

2013-06-23 Thread Roy Smith
In article 51c66a03$0$2$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 22 Jun 2013 23:12:49 -0400, Roy Smith wrote: Number 2 on the list is Months have either 30 or 31 days, which was obviously believed by whoever made this sign:

Re: Don't feed the troll...

2013-06-23 Thread rurpy
On 06/21/2013 01:32 PM, Antoon Pardon wrote: Op 19-06-13 23:13, ru...@yahoo.com schreef: On 06/19/2013 04:57 AM, Antoon Pardon wrote: Op 19-06-13 05:46, ru...@yahoo.com schreef: I don't remember making such a claim. What I do remember is you among others claiming that the problem was not (so

Re: Making a pass form cgi = webpy framework

2013-06-23 Thread rurpy
On 06/23/2013 07:01 AM, Νίκος wrote: Hello, as you all know i'am using cgi method for my web script. I have been told that webpy is the way to go sor script simple enough as mines. Can you please show me the simplest example you can think of utilizing a templates (index.html) and a

Re: Making a pass form cgi = webpy framework

2013-06-23 Thread Νίκος
Στις 23/6/2013 5:57 μμ, ο/η ru...@yahoo.com έγραψε: On 06/23/2013 07:01 AM, Νίκος wrote: Hello, as you all know i'am using cgi method for my web script. I have been told that webpy is the way to go sor script simple enough as mines. Can you please show me the simplest example you can think

Re: n00b question on spacing

2013-06-23 Thread Terry Reedy
On 6/22/2013 9:20 PM, MRAB wrote: [snip] One vs not-one isn't good enough. Some languages use the singular with any numbers ending in '1'. Some languages have singular, dual, and plural. Etc. It's surprising how inventive people can be! :-) In the Idle output window for file grepping, I just

Re: A few questiosn about encoding

2013-06-23 Thread wxjmfauth
Le jeudi 20 juin 2013 19:17:12 UTC+2, MRAB a écrit : On 20/06/2013 17:37, Chris Angelico wrote: On Fri, Jun 21, 2013 at 2:27 AM, wxjmfa...@gmail.com wrote: And all these coding schemes have something in common, they work all with a unique set of code points, more precisely a

tkinter

2013-06-23 Thread JK
Nazdar mládenci, měl bych zájem dokončit překlad Tkinteru (http://tkinter.programujte.com/index.htm), na kterém před šesti lety pracovali zejména Pavel Kosina a Jakub Vojáček. Poslal jsem jim mejla ale nehlásí se mi. Poradíte mi? Před několika dny jsem přeložil pěkné texty o Tkinteru

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Ian Kelly
On Sun, Jun 23, 2013 at 7:35 AM, Adam Jiang jiang.a...@gmail.com wrote: Another question raised here is that what is the proper way to refer to parent class? For example, class A(object): def __init__(self, arg): print A class B(A): def __init__(self, arg):

Re: A few questiosn about encoding

2013-06-23 Thread Steven D'Aprano
On Sun, 23 Jun 2013 08:51:41 -0700, wxjmfauth wrote: utf-8: how many bytes to hold an a in memory? one byte. flexible string representation: how many bytes to hold an a in memory? One byte? No, two. (Funny, it consumes more memory to hold an ascii char than ascii itself) Incorrect. Python

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Steven D'Aprano
On Sun, 23 Jun 2013 10:15:38 -0600, Ian Kelly wrote: If you're worried about efficiency, you can also explicitly name the superclass in order to call the method directly, like: A.__init__(self, arg) Please don't. This is false economy. The time you save will be trivial, the

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Roy Smith
In article 51c723b4$0$2$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 23 Jun 2013 10:15:38 -0600, Ian Kelly wrote: If you're worried about efficiency, you can also explicitly name the superclass in order to call the method

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Ian Kelly
On Sun, Jun 23, 2013 at 10:49 AM, Roy Smith r...@panix.com wrote: One thing I've never understood about Python 2.x's multiple inheritance (mostly because I almost never use it) is how you do something like this: class Base1(object): def __init__(self, foo): self.foo = foo class

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Ian Kelly
On Sun, Jun 23, 2013 at 11:08 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Sun, Jun 23, 2013 at 10:49 AM, Roy Smith r...@panix.com wrote: am I missing something here? Yes, you're missing that super() does not simply call the base class, but rather the next class in the MRO for whatever the

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Steven D'Aprano
On Sat, 22 Jun 2013 23:40:53 -0600, Ian Kelly wrote: On Sat, Jun 22, 2013 at 11:23 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 22 Jun 2013 22:27:10 -0600, Ian Kelly wrote: I actually consider that an up side. Sure it's inconvenient that you can't delegate all

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Steven D'Aprano
On Sun, 23 Jun 2013 11:18:41 -0600, Ian Kelly wrote: Incidentally, although super() is useful, it's not perfect, and this is one of my grievances with it: that a user can, based upon the name, draw an inaccurate assumption about what it does without reading or fully understanding the

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Ian Kelly
On Sun, Jun 23, 2013 at 11:36 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 23 Jun 2013 11:18:41 -0600, Ian Kelly wrote: Incidentally, although super() is useful, it's not perfect, and this is one of my grievances with it: that a user can, based upon the name, draw

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Roy Smith
In article mailman.3730.1372007386.3114.python-l...@python.org, Ian Kelly ian.g.ke...@gmail.com wrote: Yes, you're missing that super() does not simply call the base class, but rather the next class in the MRO for whatever the type of the self argument is. If you write the above as: class

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Steven D'Aprano
On Sun, 23 Jun 2013 12:49:42 -0400, Roy Smith wrote: One thing I've never understood about Python 2.x's multiple inheritance (mostly because I almost never use it) is how you do something like this: class Base1(object): def __init__(self, foo): self.foo = foo class

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Steven D'Aprano
On Sun, 23 Jun 2013 12:04:35 -0600, Ian Kelly wrote: On Sun, Jun 23, 2013 at 11:36 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 23 Jun 2013 11:18:41 -0600, Ian Kelly wrote: Incidentally, although super() is useful, it's not perfect, and this is one of my

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Ian Kelly
On Sun, Jun 23, 2013 at 12:46 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: All is not lost, there are ways to make your classes cooperative. The trick is to have your classes' __init__ methods ignore keyword arguments they don't know what to do with. object used to do the

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Ian Kelly
On Sun, Jun 23, 2013 at 12:50 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: What else would you call a function that does lookups on the current object's superclasses? Well, as James Knight points out in the Super Considered Harmful article, the equivalent in Dylan is called

Re: Finding all instances of a string in an XML file

2013-06-23 Thread Jason Friedman
xml = ?xml version=1.0 encoding=UTF-8? !DOCTYPE KMART SYSTEM my.dtd LEVEL_1 LEVEL_2 ATTR=hello ATTRIBUTE NAME=Property X VALUE =2/ /LEVEL_2 LEVEL_2 ATTR=goodbye ATTRIBUTE NAME=Property Y VALUE =NULL/ LEVEL_3 ATTR=aloha ATTRIBUTE NAME=Property X VALUE =3/

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Roy Smith
In article 51c74373$0$2$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 23 Jun 2013 12:04:35 -0600, Ian Kelly wrote: On Sun, Jun 23, 2013 at 11:36 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 23 Jun

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Rick Johnson
On Sunday, June 23, 2013 11:15:38 AM UTC-5, Ian wrote: If you're worried about efficiency, you can also explicitly name the superclass in order to call the method directly, like: I'm NOT worried about efficiency, i worried about readability, and using super (when super is NOT absolutely

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Rick Johnson
On Sunday, June 23, 2013 11:49:42 AM UTC-5, Roy Smith wrote: For what it's worth, I never bother to inherit from object unless I know there's something I need from new style classes. Undoubtedly, this creates a disturbance in The Force, but such is life. Well, in Python 3000, if you don't

Python development tools

2013-06-23 Thread cutems93
Hello, I am new to python development and I want to know what kinds of tools people use for python development. I went to Python website and found several tools. 1. Automated Refactoring Tools 2. Bug Tracking 3. Configuration And BuildTools 4. Distribution Utilities 5. Documentation Tools 6.

Re: Python development tools

2013-06-23 Thread Giorgos Tzampanakis
On 2013-06-23, cutems93 wrote: Hello, I am new to python development and I want to know what kinds of tools people use for python development. I went to Python website and found several tools. 1. Automated Refactoring Tools 2. Bug Tracking 3. Configuration And BuildTools 4.

Re: Making a pass form cgi = webpy framework

2013-06-23 Thread rurpy
On 06/23/2013 09:15 AM, Νίκος wrote: Στις 23/6/2013 5:57 μμ, ο/η ru...@yahoo.com έγραψε: On 06/23/2013 07:01 AM, Νίκος wrote: Hello, as you all know i'am using cgi method for my web script. I have been told that webpy is the way to go sor script simple enough as mines. Can you please show

Re: Python development tools

2013-06-23 Thread rurpy
On 06/23/2013 02:40 PM, cutems93 wrote: [...] The Python wiki at http://wiki.python.org/moin/ has a lot of info on most of your subjects. I've included links to there for some of your items below. All your items below also have comercial products available but I an not familiar with any so all

Loop Question

2013-06-23 Thread christhecomic
How do I bring users back to beginning of user/password question once they fail it? thx -- http://mail.python.org/mailman/listinfo/python-list

Re: Python development tools

2013-06-23 Thread Roy Smith
In article 263da442-0c87-41df-9118-6003c6168...@googlegroups.com, ru...@yahoo.com wrote: 1. Automated Refactoring Tools I wish. Why? I've never seen the appeal of these. I do plenty of refactoring. It's unclear to me what assistance an automated tool would provide. 2. Bug Tracking

Re: Loop Question

2013-06-23 Thread rurpy
On 06/23/2013 05:18 PM, christheco...@gmail.com wrote: How do I bring users back to beginning of user/password question once they fail it? thx This is not a very good question. There is no context so we cannot tell if you are talking about a command line program that prompts for a username

Re: Python development tools

2013-06-23 Thread rurpy
On 06/23/2013 05:49 PM, Roy Smith wrote: In article 263da442-0c87-41df-9118-6003c6168...@googlegroups.com, ru...@yahoo.com wrote: 1. Automated Refactoring Tools I wish. Why? I've never seen the appeal of these. I do plenty of refactoring. It's unclear to me what assistance an automated

Re: Python development tools

2013-06-23 Thread Roy Smith
In article ba5cbbcc-ff44-467d-91b6-108573da5...@googlegroups.com, ru...@yahoo.com wrote: Other things like finding all uses of various objects/functions etc would also be useful now and then but I suppose that is a common IDE capability? $ find . -name '*.py' | xargs grep my_function_name

Re: Loop Question

2013-06-23 Thread Steven D'Aprano
On Sun, 23 Jun 2013 16:18:35 -0700, christhecomic wrote: How do I bring users back to beginning of user/password question once they fail it? thx Write a loop. If they don't fail (i.e. they get the password correct), then break out of the loop. -- Steven --

Re: Python development tools

2013-06-23 Thread Steven D'Aprano
On Sun, 23 Jun 2013 13:40:07 -0700, cutems93 wrote: Hello, I am new to python development and I want to know what kinds of tools people use for python development. I went to Python website and found several tools. [snip list of a dozen tools] What else do I need? You don't *need* any of

Re: Python development tools

2013-06-23 Thread CM
1. Automated Refactoring Tools I wish. Why? I've never seen the appeal of these. I do plenty of refactoring. It's unclear to me what assistance an automated tool would provide. I've often wanted something that would help globally change things like function and method

Re: Python development tools

2013-06-23 Thread Tim Chase
On 2013-06-23 20:22, Roy Smith wrote: In article ba5cbbcc-ff44-467d-91b6-108573da5...@googlegroups.com, ru...@yahoo.com wrote: Other things like finding all uses of various objects/functions etc would also be useful now and then but I suppose that is a common IDE capability? $ find .

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Steven D'Aprano
On Sun, 23 Jun 2013 13:09:21 -0600, Ian Kelly wrote: On Sun, Jun 23, 2013 at 12:50 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: What else would you call a function that does lookups on the current object's superclasses? Well, as James Knight points out in the Super

Re: Python development tools

2013-06-23 Thread Roy Smith
In article mailman.3736.1372035170.3114.python-l...@python.org, Tim Chase python.l...@thechases.com wrote: I'd wager money that Emacs allows you to do something similar, I'm sure it can. But, the next step in the evolution is: $ emacs `find . -name '*.py' | xargs grep -l my_function_name` --

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Steven D'Aprano
On Sun, 23 Jun 2013 15:24:14 -0400, Roy Smith wrote: In article 51c74373$0$2$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: What else would you call a function that does lookups on the current object's superclasses? Well, mro_lookup()

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Roy Smith
In article 51c7a087$0$2$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 23 Jun 2013 15:24:14 -0400, Roy Smith wrote: In article 51c74373$0$2$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano

Re: Python development tools

2013-06-23 Thread Michael Torrie
On 06/23/2013 02:40 PM, cutems93 wrote: What else do I need? Also, which software is used in daily base? I know version control software and bug tracking software are used almost everyday by developers. Which software is used less often? Phew that's quite a list you have there. Are you coming

Re: Making a pass form cgi = webpy framework

2013-06-23 Thread Νίκος
Στις 24/6/2013 1:29 πμ, ο/η ru...@yahoo.com έγραψε: In this simple example, there is not much advantage of Mako over your templates. But with more complicated cases, for instance, when you have tables or forms that you want to dynamically construct from external data (info extracted from a

Re: What is the semantics meaning of 'object'?

2013-06-23 Thread Rotwang
On 23/06/2013 18:29, Steven D'Aprano wrote: On Sat, 22 Jun 2013 23:40:53 -0600, Ian Kelly wrote: [...] Can you elaborate or provide a link? I'm curious to know what other reason there could be for magic methods to behave differently from normal methods in this regard. It's an efficiency

Re: Python development tools

2013-06-23 Thread rusi
On Monday, June 24, 2013 5:58:03 AM UTC+5:30, Steven D'Aprano wrote: On Sun, 23 Jun 2013 13:40:07 -0700, cutems93 wrote: What else do I need? You don't *need* any of these. You only *need* two things to write Python code: something to edit text files, and the Python interpreter to check

Re: Python development tools

2013-06-23 Thread rusi
On Monday, June 24, 2013 4:48:35 AM UTC+5:30, ru...@yahoo.com wrote: On 06/23/2013 02:40 PM, cutems93 wrote: 1. Automated Refactoring Tools I wish. Here's pydev [python ide in eclipse] http://pydev.org/manual_adv_refactoring.html Note Ive never managed to get it running! --

Re: Loop Question

2013-06-23 Thread christhecomic
I'm using 2.7 -- http://mail.python.org/mailman/listinfo/python-list

Re: Making a pass form cgi = webpy framework

2013-06-23 Thread Michael Torrie
On 06/23/2013 07:44 PM, Νίκος wrote: Why use mako's approach which requires 2 files(an html template and the actual python script rendering the data) when i can have simple print statements inside 1 files(my files.py script) ? After all its only one html table i wish to display. Sooner or

Re: Making a pass form cgi = webpy framework

2013-06-23 Thread rusi
On Monday, June 24, 2013 10:07:57 AM UTC+5:30, Michael Torrie wrote: On 06/23/2013 07:44 PM, Νίκος wrote: Why use mako's approach which requires 2 files(an html template and the actual python script rendering the data) when i can have simple print statements inside 1 files(my files.py

Re: Python development tools

2013-06-23 Thread CM
On Sunday, June 23, 2013 4:40:07 PM UTC-4, cutems93 wrote: Hello, I am new to python development and I want to know what kinds of tools people use for python development. I went to Python website and found [12 different types of] tools. What else do I need? Also, which software is

Re: Python development tools

2013-06-23 Thread cutems93
On Sunday, June 23, 2013 1:40:07 PM UTC-7, cutems93 wrote: Hello, I am new to python development and I want to know what kinds of tools people use for python development. I went to Python website and found several tools. 1. Automated Refactoring Tools 2. Bug Tracking 3.

Re: tkinter

2013-06-23 Thread Christian Gollwitzer
Ahoj, Am 23.06.13 18:06, schrieb JK: Nazdar mládenci, this is an English (only) speaking group. Therefore you will not get much response by posting in Czech. měl bych zájem dokončit překlad Tkinteru (http://tkinter.programujte.com/index.htm), na kterém před šesti lety pracovali zejména

[issue18283] shutil.which() should support bytes

2013-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about bytearrays and other byte-like objects? However I'm not sure this enhancement is worth to be accepted. Many other high-level functions in os and shutil modules do not support bytes paths. For shutil.which() there is no backward compatibility with

[issue18236] int() and float() do not accept strings with trailing separators

2013-06-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: I stand by that comment: IsWhiteSpace should use the Unicode White_Space property. Since FS/GS/RS/US are not in the White_Space property, it's correct that the int conversion fails. It's incorrect that .isspace() gives true. There are really several bugs

[issue9097] os.chdir(path) to return current dir

2013-06-23 Thread anatoly techtonik
anatoly techtonik added the comment: ..and still I miss: with os.chdir(path): do_something() -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9097 ___

[issue18236] int() and float() do not accept strings with trailing separators

2013-06-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I agree with Martin. At the time Unicode was added to Python, there was no single Unicode property for white space, so I had to deduce this from the other available properties. Now that we have a white space property in Unicode, we should start using it.

[issue9097] os.chdir(path) to return current dir

2013-06-23 Thread STINNER Victor
STINNER Victor added the comment: The idea was discussed many times, and there are existing implementations: http://mail.python.org/pipermail/python-ideas/2013-January/018756.html http://www.astropython.org/snippet/2009/10/chdir-context-manager

[issue18283] shutil.which() should support bytes

2013-06-23 Thread STINNER Victor
STINNER Victor added the comment: What about bytearrays and other byte-like objects? However I'm not sure this enhancement is worth to be accepted. Many other high-level functions in os and shutil modules do not support bytes paths. For shutil.which() there is no backward compatibility with

[issue18283] shutil.which() should support bytes

2013-06-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18283 ___ ___ Python-bugs-list

[issue18236] int() and float() do not accept strings with trailing separators

2013-06-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18236 ___ ___ Python-bugs-list

[issue11016] Re-implementation of the stat module in C

2013-06-23 Thread STINNER Victor
STINNER Victor added the comment: And stat_filemode() should detect integer overflow. Attached stat_mode_overflow.patch should fix this issue. (I would also suggest to inline fileperm() into stat_filemode(), or pass buf instead of buf[1]. But you may not agree, as you want :-)) --

[issue18137] format(float, str): integer overflow for huge precision

2013-06-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef5175d08e7e by Victor Stinner in branch '3.3': Issue #18137: Detect integer overflow on precision in float.__format__() and http://hg.python.org/cpython/rev/ef5175d08e7e New changeset 81fef2666ebb by Victor Stinner in branch 'default': (Merge 3.3)

[issue18137] format(float, str): integer overflow for huge precision

2013-06-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18137 ___

[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)

2013-06-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset f0d934732ab1 by Victor Stinner in branch '3.3': Issue #18135: Fix a possible integer overflow in ssl.SSLSocket.write() http://hg.python.org/cpython/rev/f0d934732ab1 New changeset f90d82a75a43 by Victor Stinner in branch 'default': (Merge 3.3) Issue

[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)

2013-06-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18135 ___

[issue9097] os.chdir(path) to return current dir

2013-06-23 Thread anatoly techtonik
anatoly techtonik added the comment: an anti-pattern and encouraging a bad habit are subjective non-arguments as long as they fail to answer why. With or without the helper you still write this code: prev = os.getcwd() os.chdir(SDKPATH) ... os.chdir(prev) And because

[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)

2013-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm sorry to chime in a bit late, but I think this isn't the correct solution. Right now partial writes are not possible on a SSL socket, but this commit makes them possible. See http://bugs.python.org/issue8240 and http://bugs.python.org/issue12197 for some

[issue9097] os.chdir(path) to return current dir

2013-06-23 Thread STINNER Victor
STINNER Victor added the comment: an anti-pattern and encouraging a bad habit are subjective non-arguments as long as they fail to answer why. The reasons are explained in the python-idea thread. Please read it. With or without the helper you still write this code: Adding more functions

[issue11016] Re-implementation of the stat module in C

2013-06-23 Thread STINNER Victor
STINNER Victor added the comment: My changeset e5427b0b2bf7 is not enough: import _stat still fail on Windows. See for example: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/2164/steps/test/logs/stdio

[issue11016] Re-implementation of the stat module in C

2013-06-23 Thread STINNER Victor
STINNER Victor added the comment: test_stat.test_devices() fail on Solaris: it looks like os.devnull is a symlink. You should probably use os.stat() instead of os.lstat() for this specific test.

[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)

2013-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the right solution here would be to raise OverflowError, not truncate the output. Do you mean always? Or only if the SSL_MODE_ENABLE_PARTIAL_WRITE option is not set? SSL_MODE_ENABLE_PARTIAL_WRITE is never set. --

[issue18236] int() and float() do not accept strings with trailing separators

2013-06-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- hgrepos: +201 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18236 ___ ___

[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)

2013-06-23 Thread STINNER Victor
STINNER Victor added the comment: Right now partial writes are not possible on a SSL socket, but this commit makes them possible. Oh, I didn't know (forgot) that SSL does allow partial write by default. I think the right solution here would be to raise OverflowError, not truncate the

[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)

2013-06-23 Thread STINNER Victor
STINNER Victor added the comment: I think the right solution here would be to raise OverflowError, not truncate the output. Here is a new patch (for Python 3.3) always raising OverflowError if the string is longer than INT_MAX bytes. -- Added file:

[issue12520] spurious output in test_warnings

2013-06-23 Thread STINNER Victor
STINNER Victor added the comment: I cannot reproduce this isuse, was it fixed? $ ./python -m test test_warnings [1/1] test_warnings 1 test OK. Also, I don't understand how test_filename_none is supposed to check for issue #12467 (it doesn't use a subprocess). You don't need a subprocess to

[issue18236] int() and float() do not accept strings with trailing separators

2013-06-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file30677/5c934626d44d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18236

[issue11016] Re-implementation of the stat module in C

2013-06-23 Thread Christian Heimes
Christian Heimes added the comment: I have addressed the Windows build issue in http://hg.python.org/cpython/rev/838f04e5a690 and the failing test on Solaris in http://hg.python.org/cpython/rev/6c23ca1982b3 (also 2.7 and default). -- ___ Python

[issue7267] format method: c presentation type broken

2013-06-23 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: test needed - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7267 ___ ___

[issue18287] PyType_Ready() should sanity-check the tp_name field

2013-06-23 Thread Niklas Koep
New submission from Niklas Koep: I noticed that defining a new type where the tp_name field is NULL causes segfaults, for instance, when calling pydoc on the extension module. This particular segfault traces back to type_module() in Objects/typeobject.c where tp_name is passed to strrchr().

[issue18236] str.isspace should use the Unicode White_Space property

2013-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have updated the title to focus this issue on the behavior of str.isspace(). I'll pick up remaining int/float issues in #10581. -- assignee: - belopolsky title: int() and float() do not accept strings with trailing separators - str.isspace

[issue18236] str.isspace should use the Unicode White_Space property

2013-06-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: Added file: http://bugs.python.org/file30679/3ed5bb7fcee9.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18236 ___

[issue18236] str.isspace should use the Unicode White_Space property

2013-06-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: Removed file: http://bugs.python.org/file30677/5c934626d44d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18236 ___

[issue9097] os.chdir(path) to return current dir

2013-06-23 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9097 ___ ___ Python-bugs-list

[issue9097] os.chdir(path) to return current dir

2013-06-23 Thread anatoly techtonik
anatoly techtonik added the comment: On Sun, Jun 23, 2013 at 4:32 PM, STINNER Victor rep...@bugs.python.orgwrote: STINNER Victor added the comment: an anti-pattern and encouraging a bad habit are subjective non-arguments as long as they fail to answer why. The reasons are explained in

[issue9097] os.chdir(path) to return current dir

2013-06-23 Thread R. David Murray
R. David Murray added the comment: I would prefer that Haypo spend his time contributing code to Python. If someone else wants to summarize the arguments in the thread for this issue, that would be great. Absent that, the link to the discussion is sufficient for the curious. In any case,

[issue10581] Review and document string format accepted in numeric data type constructors

2013-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Martin v. Löwis wrote at #18236 (msg191687): int conversion ultimately uses Py_ISSPACE, which conceptually could deviate from the Unicode properties (as it is byte-based). This is not really an issue, since they indeed match. Py_ISSPACE matches Unicode

[issue10581] Review and document string format accepted in numeric data type constructors

2013-06-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10581 ___ ___

[issue18184] Add range check for %c in PyUnicode_FromFormat

2013-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, I don't feel motivated right now (and this is a case when even never is better than right now). I checked other format methods and found a bug only in PyUnicode_FromFormatV(). I had added test for 3.3+ because 3.3+ already have a test for

[issue18260] configparser: TypeError occurs when handling errors in files with binary names

2013-06-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 56c1227f21f5 by Łukasz Langa in branch '3.3': Fixed issue #18260: configparser TypeError on source name specified as bytes http://hg.python.org/cpython/rev/56c1227f21f5 New changeset 06e70937364b by Łukasz Langa in branch 'default': Merged fix for

[issue18260] configparser: TypeError occurs when handling errors in files with binary names

2013-06-23 Thread Łukasz Langa
Łukasz Langa added the comment: 1. Duplicate sections and options are consciously reported as errors now. This is a documented backwards-incompatible change [1]_. If you wish to revert to previous behaviour, you can set strict=False on parser creation. 2. It's really just a coincidence that

[issue18184] Add range check for %c in PyUnicode_FromFormat

2013-06-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8ede55cf92b by Serhiy Storchaka in branch '3.3': Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise http://hg.python.org/cpython/rev/f8ede55cf92b New changeset 42def600210e by Serhiy Storchaka in branch 'default': Issue

[issue12641] Remove -mno-cygwin from distutils

2013-06-23 Thread frattaroli.nicolas
frattaroli.nicolas added the comment: It's cool that you guys are discussing semantics of who said what and how, but that still doesn't fix this very simple issue that breaks compiling for everyone on Windows who uses MinGW. -mno-cygwin, was, as far as I know, only ever required to build from

[issue18234] Unicodedata module should provide access to codepoint aliases

2013-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Rather than adding a new method to unicodedata, what do you think about adding a type keyword argument to unicodedata.name()? It can default to canonical and have possible values control, abbreviation, etc. See also #12753. --

[issue11390] doctest: add cmdline parameters

2013-06-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset ae802dc4dcd4 by R David Murray in branch 'default': #11390: convert doctest CLI to argparse and add -o and -f options. http://hg.python.org/cpython/rev/ae802dc4dcd4 -- nosy: +python-dev ___ Python

[issue11390] doctest: add cmdline parameters

2013-06-23 Thread R. David Murray
R. David Murray added the comment: Committed. Thanks for the review, Barry. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11390

[issue18184] Add range check for %c in PyUnicode_FromFormat

2013-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree, a ValueError may be better than OverflowError, but all other formattings raise OverflowError, and we should support them consistent. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed

  1   2   >