Re: Is Unicode support so hard...

2013-04-21 Thread 88888 Dihedral
jmfauth於 2013年4月21日星期日UTC+8上午1時12分43秒寫道: In a previous post, http://groups.google.com/group/comp.lang.python/browse_thread/thread/6aec70817705c226# , Chris “Kwpolska” Warrick wrote: “Is Unicode support so hard, especially in the 21st century?” -- Unicode is

django vs zope vs web2py

2013-04-21 Thread Alok Singh Mahor
Hi everyone, few months back I decided to adopt python for my all sort of work including web progra -- http://mail.python.org/mailman/listinfo/python-list

Re: django vs zope vs web2py

2013-04-21 Thread Alok Singh Mahor
I am sorry by mistake I sent incomplete mail here is my mail. Hi everyone, few months back I decided to adopt python for my all sort of work including web programming. and I have wasted long time deciding which to adopt out of django, zope and web2py. I am from php and drupal background. which

ask for note keeper tomboy's style

2013-04-21 Thread LordMax
Hi to all. I am new to python and I was asked to implement a system of notes in tomboy's style for my company. As one of the requirements is the ability to synchronize notes between multiple PC (program level or through cloud-folder does not matter) I was wondering if there is something

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-21 Thread 88888 Dihedral
Uday S Reddy於 2013年4月17日星期三UTC+8下午5時10分58秒寫道: Mark Janssen writes: Having said that, theorists do want to unify concepts wherever possible and wherever they make sense. Imperative programming types, which I will call storage types, are semantically the same as classes.

Re: django vs zope vs web2py

2013-04-21 Thread rusi
On Apr 21, 11:18 am, Alok Singh Mahor alokma...@gmail.com wrote: I am sorry by mistake I sent incomplete mail here is my mail. Hi everyone, few months back I decided to adopt python for my all sort of work including web programming. and I have wasted long time deciding which to adopt out of

Re: itertools.groupby

2013-04-21 Thread Peter Otten
Jason Friedman wrote: I have a file such as: $ cat my_data Starting a new group a b c Starting a new group 1 2 3 4 Starting a new group X Y Z Starting a new group I am wanting a list of lists: ['a', 'b', 'c'] ['1', '2', '3', '4'] ['X', 'Y', 'Z'] [] I wrote this:

ANN: Albow 2.2.0

2013-04-21 Thread Gregory Ewing
ALBOW - A Little Bit of Widgetry for PyGame Version 2.2 is now available. http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/ Highlights of this version: * Multichoice control * Powerful new facilities for hot-linking controls to application data There are also many other

Re: Is Unicode support so hard...

2013-04-21 Thread Terry Jan Reedy
On 4/20/2013 9:37 PM, rusi wrote: I believe that the recent correction in unicode performance followed jmf's grumbles No, the correction followed upon his accurate report of a regression, last August, which was unfortunately mixed in with grumbles and inaccurate claims. Others separated out

Re: clear the screen

2013-04-21 Thread Dave Angel
On 04/20/2013 10:45 PM, Yuanyuan Li wrote: How to clear the screen? For example, in the two player game. One player sets a number and the second player guesses the number. When the first player enters the number, it should be cleared so that the second number is not able to see it. My

Re: django vs zope vs web2py

2013-04-21 Thread Roy Smith
In article 47fb29e2-3e78-4989-850b-24359d84b...@googlegroups.com, Alok Singh Mahor alokma...@gmail.com wrote: I am sorry by mistake I sent incomplete mail here is my mail. Hi everyone, few months back I decided to adopt python for my all sort of work including web programming. and I have

Re: Is Unicode support so hard...

2013-04-21 Thread Mark Lawrence
On 21/04/2013 10:02, Terry Jan Reedy wrote: On 4/20/2013 9:37 PM, rusi wrote: I believe that the recent correction in unicode performance followed jmf's grumbles No, the correction followed upon his accurate report of a regression, last August, which was unfortunately mixed in with grumbles

Re: django vs zope vs web2py

2013-04-21 Thread Surya Kasturi
On Sun, Apr 21, 2013 at 11:48 AM, Alok Singh Mahor alokma...@gmail.comwrote: I am sorry by mistake I sent incomplete mail here is my mail. Hi everyone, few months back I decided to adopt python for my all sort of work including web programming. and I have wasted long time deciding which to

Re: django vs zope vs web2py

2013-04-21 Thread Modulok
Hi everyone, few months back I decided to adopt python for my all sort of work including web programming... -- http://mail.python.org/mailman/listinfo/python-list Pick Django or web2py. You'll be happy with either. (I have no experience with zope.) They're both full featured

Re: clear the screen

2013-04-21 Thread Steven D'Aprano
On Sat, 20 Apr 2013 19:45:46 -0700, Yuanyuan Li wrote: How to clear the screen? For example, in the two player game. One player sets a number and the second player guesses the number. When the first player enters the number, it should be cleared so that the second number is not able to see

Re: There must be a better way

2013-04-21 Thread Colin J. Williams
On 20/04/2013 9:07 PM, Terry Jan Reedy wrote: On 4/20/2013 8:34 PM, Tim Chase wrote: In 2.x, the csv.reader() class (and csv.DictReader() class) offered a .next() method that is absent in 3.x In Py 3, .next was renamed to .__next__ for *all* iterators. The intention is that one iterate with

Re: There must be a better way

2013-04-21 Thread Jussi Piitulainen
Colin J. Williams writes: ... It is not usual to have a name with preceding and following udserscores,imn user code. Presumably, there is a rationale for the change from csv.reader.next to csv.reader.__next__. ... I think the user code is supposed to be next(csv.reader). For example,

Re: There must be a better way

2013-04-21 Thread Peter Otten
Colin J. Williams wrote: I was seeking some code that would be acceptable to both Python 2.7 and 3.3. In the end, I used: inData= csv.reader(inFile) def main(): if ver == '2': headerLine= inData.next() else: headerLine= inData.__next__() ... I

Porting 2.x to 3.3: BaseHTTPServer

2013-04-21 Thread Chris Angelico
I'm porting an old project to Python 3, with the intention of making one codebase that will still run on 2.6/2.7 as well as 3.2+ (or 3.3+, if 3.2 is in any way annoying). My first step was to run the code through 2to3, and the basics are already sorted out by that. Got one question though, and

Re: Porting 2.x to 3.3: BaseHTTPServer

2013-04-21 Thread Roy Smith
In article mailman.879.1366551990.3114.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: In the current version of the code, I use BaseHTTPServer as the main structure of the request handler. 2to3 translated this into http.server, which seems to be the nearest direct translation.

Re: Porting 2.x to 3.3: BaseHTTPServer

2013-04-21 Thread Chris Angelico
On Mon, Apr 22, 2013 at 12:01 AM, Roy Smith r...@panix.com wrote: In article mailman.879.1366551990.3114.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: In the current version of the code, I use BaseHTTPServer as the main structure of the request handler. 2to3 translated this

Re: django vs zope vs web2py

2013-04-21 Thread Alok Singh Mahor
On Sun, Apr 21, 2013 at 5:49 PM, Modulok modu...@gmail.com wrote: Hi everyone, few months back I decided to adopt python for my all sort of work including web programming... -- http://mail.python.org/mailman/listinfo/python-list Pick Django or web2py. You'll be happy with either.

suggestion for a small addition to the Python 3 list class

2013-04-21 Thread Robert Yacobellis
Greetings, I'm an instructor of Computer Science at Loyola University, Chicago, and I and Dr. Harrington (copied on this email) teach sections of COMP 150, Introduction to Computing, using Python 3. One of the concepts we teach students is the str methods split() and join(). I have a

Re: There must be a better way

2013-04-21 Thread Colin J. Williams
On 21/04/2013 9:39 AM, Jussi Piitulainen wrote: Colin J. Williams writes: ... It is not usual to have a name with preceding and following udserscores,imn user code. Presumably, there is a rationale for the change from csv.reader.next to csv.reader.__next__. ... I think the user code is

Re: There must be a better way

2013-04-21 Thread Colin J. Williams
On 21/04/2013 9:43 AM, Peter Otten wrote: Colin J. Williams wrote: I was seeking some code that would be acceptable to both Python 2.7 and 3.3. In the end, I used: inData= csv.reader(inFile) def main(): if ver == '2': headerLine= inData.next() else:

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-21 Thread rusi
On Apr 15, 8:48 am, Mark Janssen dreamingforw...@gmail.com wrote: That all being said, the thrust of this whole effort is to possibly advance Computer Science and language design, because in-between the purely concrete object architecture of the imperative programming languages and the purely

Re: itertools.groupby

2013-04-21 Thread Jason Friedman
#!/usr/bin/python3 from itertools import groupby def get_lines_from_file(file_name): with open(file_name) as reader: for line in reader.readlines(): yield(line.strip()) counter = 0 def key_func(x): if x.startswith(Starting a new group): global

Re: suggestion for a small addition to the Python 3 list class

2013-04-21 Thread Lele Gaifax
Robert Yacobellis ryacobel...@luc.edu writes: I've noticed that the str join() method takes an iterable, so in the most general case I'm suggesting to add a join() method to every Python-provided iterable (however, for split() vs. join() it would be sufficient to just add a join() method to

Remove some images from a mail message

2013-04-21 Thread Jason Friedman
I will be receiving email that contains, say, 10 images, and I want to forward that message on after removing, say, 5 of those images. I will remove based on size, for example 1679 bytes. I am aware that other images besides the unwanted ones could be 1679 bytes but this is unlikely and the

Re: ask for note keeper tomboy's style

2013-04-21 Thread Michael Torrie
On 04/21/2013 12:20 AM, LordMax wrote: Hi to all. I am new to python and I was asked to implement a system of notes in tomboy's style for my company. As one of the requirements is the ability to synchronize notes between multiple PC (program level or through cloud-folder does not matter)

Re: Porting 2.x to 3.3: BaseHTTPServer

2013-04-21 Thread Serhiy Storchaka
21.04.13 16:46, Chris Angelico написав(ла): Also, it's expecting bytes everywhere, and I can't find a simple way to declare an encoding and let self.wfile.write() accept str. Do I have to explicitly encode everything that I write, or is there a cleaner way? io.TextIOWrapper --

Re: suggestion for a small addition to the Python 3 list class

2013-04-21 Thread Steven D'Aprano
On Sun, 21 Apr 2013 09:09:20 -0500, Robert Yacobellis wrote: Greetings, I'm an instructor of Computer Science at Loyola University, Chicago, and I and Dr. Harrington (copied on this email) teach sections of COMP 150, Introduction to Computing, using Python 3. One of the concepts we teach

Re: Remove some images from a mail message

2013-04-21 Thread Dave Angel
On 04/21/2013 01:31 PM, Jason Friedman wrote: I will be receiving email that contains, say, 10 images, and I want to forward that message on after removing, say, 5 of those images. I will remove based on size, for example 1679 bytes. I am aware that other images besides the unwanted ones could

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-21 Thread James Jong
I see, just to be clear, do you mean that Python 2.7.4 (stable) is incompatible with Tk 8.6 (stable)? James On Fri, Apr 19, 2013 at 12:27 PM, Serhiy Storchaka storch...@gmail.comwrote: 18.04.13 19:24, James Jong написав(ла): The file libtk8.6.so http://libtk8.6.so has 1.5M and is

Re: ask for note keeper tomboy's style

2013-04-21 Thread Walter Hurry
On Sun, 21 Apr 2013 11:42:06 -0600, Michael Torrie wrote: On 04/21/2013 12:20 AM, LordMax wrote: Hi to all. I am new to python and I was asked to implement a system of notes in tomboy's style for my company. As one of the requirements is the ability to synchronize notes between multiple

Weird behaviour?

2013-04-21 Thread jussij
Can someone please explain the following behaviour? I downloaded and compiled the Python 2.7.2 code base. I then created this simple c:\temp\test.py macro: import sys def main(): print(Please Input 120: ) input = raw_input() print(Value Inputed: +

Re: Weird behaviour?

2013-04-21 Thread Chris Angelico
On Mon, Apr 22, 2013 at 10:37 AM, jus...@zeusedit.com wrote: Can someone please explain the following behaviour? If I run the macro using the -u (flush buffers) option the if statement always fails: C:\Temppython.exe -u c:\temp\test.py Please Input 120: 120 Value

Re: Weird behaviour?

2013-04-21 Thread Steven D'Aprano
On Sun, 21 Apr 2013 17:37:18 -0700, jussij wrote: Can someone please explain the following behaviour? I downloaded and compiled the Python 2.7.2 code base. I then created this simple c:\temp\test.py macro: import sys def main(): print(Please Input 120: )

Re: Weird behaviour?

2013-04-21 Thread jussij
On Monday, April 22, 2013 10:56:11 AM UTC+10, Chris Angelico wrote: so your string actually contains '120\r', as will be revealed by its repr(). Thanks Chris. That makes sense. Cheers Jussi -- http://mail.python.org/mailman/listinfo/python-list

Re: Weird behaviour?

2013-04-21 Thread Chris Angelico
On Mon, Apr 22, 2013 at 11:05 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I cannot confirm that behaviour. It works fine for me. I should mention: Under Linux, there's no \r, so -u or no -u, the program will work fine. ChrisA --

Re: Weird behaviour?

2013-04-21 Thread Steven D'Aprano
On Mon, 22 Apr 2013 10:56:11 +1000, Chris Angelico wrote: You're running this under Windows. The convention on Windows is for end-of-line to be signalled with \r\n, but the convention inside Python is to use just \n. With the normal use of buffered and parsed input, this is all handled for

Re: Weird behaviour?

2013-04-21 Thread jussij
On Monday, April 22, 2013 11:05:11 AM UTC+10, Steven D'Aprano wrote: I cannot confirm that behaviour. It works fine for me. As Chris pointed out there is a \r character at the end of the string and that is causing the if to fail. I can now see the \r :) So this is *Windows only* behaviour.

Re: suggestion for a small addition to the Python 3 list class

2013-04-21 Thread Terry Jan Reedy
On 4/21/2013 1:12 PM, Lele Gaifax wrote: Robert Yacobellis ryacobel...@luc.edu writes: I've noticed that the str join() method takes an iterable, Specifically, it takes an iterable of strings. Any iterable can be made such iwth map(str, iterable) or map(repr, iterble). so in the most

Re: itertools.groupby

2013-04-21 Thread Joshua Landau
On 21 April 2013 01:13, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I wouldn't use groupby. It's a hammer, not every grouping job is a nail. Instead, use a simple accumulator: def group(lines): accum = [] for line in lines: line = line.strip() if

Re: Ubuntu package python3 does not include tkinter

2013-04-21 Thread Steven D'Aprano
On Sat, 20 Apr 2013 18:10:58 +0200, Sibylle Koczian wrote: Am 19.04.2013 19:42, schrieb lcrocker: I understand that for something like a server distribution, but Ubuntu is a user-focused desktop distribution. It has a GUI, always. The purpose of a distro like that is to give users a good

Re: Ubuntu package python3 does not include tkinter

2013-04-21 Thread rusi
On Apr 22, 8:57 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Sat, 20 Apr 2013 18:10:58 +0200, Sibylle Koczian wrote: Am 19.04.2013 19:42, schrieb lcrocker: I understand that for something like a server distribution, but Ubuntu is a user-focused desktop distribution.

Re: Ubuntu package python3 does not include tkinter

2013-04-21 Thread Andrew Berg
On 2013.04.21 22:57, Steven D'Aprano wrote: It's only easy to install a package on Ubuntu if you know that you have to, and can somehow work out the name of the package. I haven't worked with Ubuntu or apt-based packaging in ages, but isn't this kind of information in a description message or

Re: Ubuntu package python3 does not include tkinter

2013-04-21 Thread rusi
On Apr 22, 9:24 am, Andrew Berg bahamutzero8...@gmail.com wrote: On 2013.04.21 22:57, Steven D'Aprano wrote: It's only easy to install a package on Ubuntu if you know that you have to, and can somehow work out the name of the package. I haven't worked with Ubuntu or apt-based packaging in

ANN: rom 0.10 - Redis object mapper for Python

2013-04-21 Thread Josiah Carlson
Hey everyone, I know, it's been several years since I announced anything on these lists, but I suspect that some of you may have uses for my new package, so here you go. The rom package is a Redis object mapper for Python. It sports an interface similar to Django's ORM, SQLAlchemy + Elixir, or

Re: Ubuntu package python3 does not include tkinter

2013-04-21 Thread Andrew Berg
On 2013.04.21 23:34, rusi wrote: On Apr 22, 9:24 am, Andrew Berg bahamutzero8...@gmail.com wrote: On 2013.04.21 22:57, Steven D'Aprano wrote: It's only easy to install a package on Ubuntu if you know that you have to, and can somehow work out the name of the package. I haven't worked with

How to get urllib2 HTTPConnection object, use httplib methods?

2013-04-21 Thread Brian Raymond
I have a httplib based application and in an effort to find a quick way to start leveraging urllib2, including NTLM authentication (via python-ntlm) I am hoping there is a way to utilize an HTTPConnection object opened by urllib2. The goal is to change the initial opener to use urllib2, after

[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)

2013-04-21 Thread koobs
koobs added the comment: There's some work that's been in the FreeBSD bleachers since Jul 2012 to add futimens() and utimensat(), with some recent activity: RFC: futimens(2) and utimensat(2) - Jul 2012 http://lists.freebsd.org/pipermail/freebsd-arch/2012-February/012409.html RFC: futimens(2)

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-21 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: I have restarted the work on PEP 3154. Stefan Mihaila had begun an implementation as part of the Google Summer of Code 2012. Unfortunately, he hit multiple roadblocks which prevented him to finish his work by the end of the summer. He previously shown

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2013-04-21 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I have started a new implementation of PEP 3154 since Stefan hasn't been active on his. Moving the discussion to Issue #17810. -- dependencies: -Unbinding of methods resolution: - out of date stage: patch review - committed/rejected status:

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-21 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- dependencies: +Unbinding of methods ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17810 ___

[issue17807] Generator cleanup without tp_del

2013-04-21 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +isoschiz, pconnell -pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17807 ___ ___

[issue17807] Generator cleanup without tp_del

2013-04-21 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17807 ___ ___ Python-bugs-list mailing

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17810 ___ ___

[issue17776] IDLE Internationalization

2013-04-21 Thread Damien Marié
Damien Marié added the comment: Here is a new patch featuring: _ a setting to disable idle i18n _ a documentation Things needed: _ taking into account Windows (where IDLE is mainly used) _ a much in-depth translation of the interface: Context-menu, dialogs, ... _ unit-testing it To test it by

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- keywords: +patch Added file: http://bugs.python.org/file29966/9f1be171da08.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17810 ___

[issue17804] streaming struct unpacking

2013-04-21 Thread Mark Dickinson
Mark Dickinson added the comment: This seems like an attractive idea. There's definitely a need for repeated unpacking with the same pattern, and I agree that putting the repetition into the pattern is suboptimal (not least from the point of view of caching structs). One thing that feels a

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for reviving this :) A couple of questions: - why ADDITEM in addition to ADDITEMS? I don't think single-element sets are an important use case (as opposed to, say, single-element tuples) - what is the purpose of STACK_GLOBAL? I would say memoization

[issue17808] No code example for Event object in threading module

2013-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: An example should generally show something interesting or non-obvious, which isn't the case here. IMHO an Event is simple enough to use that it doesn't need an example; furthermore, the example you are proposing doesn't really showcase anything interesting,

[issue17065] Fix sporadic buildbot failures for test_winreg

2013-04-21 Thread Jeremy Kloth
Jeremy Kloth added the comment: Not to sound needy, but could the patch be looked into being integrated soon? This problem had only occurred once or twice a month however it has caused failures three times just in the last week. -- ___ Python

[issue17670] Improve str.expandtabs() doc

2013-04-21 Thread Eli Bendersky
Eli Bendersky added the comment: LGTM! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17670 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-21 Thread Mike Milkin
Mike Milkin added the comment: Sure ill modify the patch, thanks for the feedback. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682 ___ ___

[issue17065] Fix sporadic buildbot failures for test_winreg

2013-04-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0882960fa6df by R David Murray in branch '3.3': #17065: Use process-unique key for winreg test. http://hg.python.org/cpython/rev/0882960fa6df New changeset c7806d1b09eb by R David Murray in branch 'default': Merge #17065: Use process-unique key for

[issue17065] Fix sporadic buildbot failures for test_winreg

2013-04-21 Thread R. David Murray
R. David Murray added the comment: Not being a windows dev I couldn't easily test the patch, so hopefully this commit won't break the buildbots :) -- nosy: +r.david.murray resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: -Python 3.2

[issue17065] Fix sporadic buildbot failures for test_winreg

2013-04-21 Thread Jeremy Kloth
Jeremy Kloth added the comment: Thank you! There are no failures due to the patch and now its just a wait and see if test_winreg will misbehave again. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17065

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17810 ___ ___

[issue17804] streaming struct unpacking

2013-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, according to a quick benchmark, iter_unpack() is 3x to 6x faster than the grouper() + unpack() recipe. (it's also a bit more user-friendly) Yes, It's mainly because a grouper written on Python. When it will be implemented in C, the difference will

[issue17804] streaming struct unpacking

2013-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, It's mainly because a grouper written on Python. When it will be implemented in C, the difference will be less. This function will be useful beside struct. I'm not against adding useful C tools to itertools, but you may have to convince Raymond ;) As

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Link to the previous attempt: issue15642. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17810 ___ ___

[issue16231] pickle persistent_id return value

2013-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was fixed for Python 3 in 0ae50aa7d97c. Should it be fixed in 2.7 too or close the issue as won't fix? Note that cPickle tests the return value of persistent_id only for None. -- nosy: +alexandre.vassalotti, pitrou, serhiy.storchaka

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Memoization consumes memory during pickling. For now every memoized object requires memory for: dict's entity; an id() integer object; a 2-element tuple; a pickle's index (an integer object). It's about 80 bytes on 32-bit platform (and twice as this on

[issue17348] Unicode - encoding seems to be lost for inputs of unicode chars

2013-04-21 Thread Tomoki Imai
Tomoki Imai added the comment: NO,this thread should not be closed! This is IDLE Bug.I found, IDLE has issue in using unicode literal. In normal interpreter in console. uこんにちは u'\u3053\u3093\u306b\u3061\u306f' In IDLE. uこんにちは u'\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1\xe3\x81\xaf' I

[issue17618] base85 encoding

2013-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As for interface, I think 'adobe' flag should be false by default. It makes encoder simpler. ascii85 encoder in Go's standard library doesn't wrap nor add Adobe's brackets. btoa/atob functions looks redundant as we can just use a85encode/a85decoder with

[issue17618] base85 encoding

2013-04-21 Thread Martin Morrison
Martin Morrison added the comment: On 21 Apr 2013, at 17:38, Serhiy Storchaka rep...@bugs.python.org wrote: Serhiy Storchaka added the comment: As for interface, I think 'adobe' flag should be false by default. It makes encoder simpler. ascii85 encoder in Go's standard library doesn't wrap

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Memoization consumes memory during pickling. For now every memoized object requires memory for: dict's entity; an id() integer object; a 2-element tuple; a pickle's index (an integer object). It's about 80 bytes on 32-bit platform (and twice as this

[issue17764] Support http.server passing bind address via commend line argument

2013-04-21 Thread Malte Swart
Malte Swart added the comment: I have updated the patch and added a paragraph for this option to the documentation. Shall I add this issue to the changelog list for python 3.4.0 alpha 1? -- Added file: http://bugs.python.org/file29969/http-server-bind-arg2.patch

[issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets

2013-04-21 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Added file: http://bugs.python.org/file29970/cd970801b061.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17795 ___

[issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets

2013-04-21 Thread Vinay Sajip
Vinay Sajip added the comment: Okay, I made the change to default socktype=None. Please try out the latest patch (ideally on all Python versions you can test with) to confirm it's OK. Then I can apply to 2.7/3.2/3.3/default. Thanks. -- ___ Python

[issue17348] Unicode - encoding seems to be lost for inputs of unicode chars

2013-04-21 Thread R. David Murray
R. David Murray added the comment: I believe you have indeed understood what the original poster was reporting. However, those lines date back a long time (2002 or earlier). They exist in Python2 only, and there they have a purpose, so they can't just be deleted. My guess is the problem is a

[issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE

2013-04-21 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- title: Unicode - encoding seems to be lost for inputs of unicode chars - Unicode - encoding seems to be lost for inputs of unicode chars in IDLE ___ Python tracker rep...@bugs.python.org

[issue17670] Improve str.expandtabs() doc

2013-04-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6a02d2af814f by Ned Deily in branch '2.7': Issue #17670: Provide an example of expandtabs() usage. http://hg.python.org/cpython/rev/6a02d2af814f New changeset 5b6ccab52a4d by Ned Deily in branch '3.3': Issue #17670: Provide an example of

[issue17670] Improve str.expandtabs() doc

2013-04-21 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- resolution: - fixed stage: commit review - committed/rejected status: open - closed type: enhancement - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17670

[issue17764] Support http.server passing bind address via commend line argument

2013-04-21 Thread R. David Murray
R. David Murray added the comment: Thanks for proposing this and working on it Malte. Could you please submit a contributor agreement? (http://www.python.org/psf/contrib). We will add the Misc/NEWS entry when we commit the patch; that file changes so rapidly that any patch to it quickly

[issue17742] Add _PyBytesWriter API

2013-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: The last patch increases the size of the code substantially. I'm still wondering what the benefits are. $ hg di --stat Include/bytesobject.h | 90 ++ Misc/NEWS |3 + Objects/bytesobject.c | 144

[issue17403] Robotparser fails to parse some robots.txt

2013-04-21 Thread R. David Murray
R. David Murray added the comment: Lucaz pointed out on IRC that the problem is that the current robotparser is implementing an outdated robots.txt standard. He may work on fixing that. -- ___ Python tracker rep...@bugs.python.org

[issue17403] Robotparser fails to parse some robots.txt

2013-04-21 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: -easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17403 ___ ___ Python-bugs-list

[issue15575] Tutorial is unclear on multiple imports of a module.

2013-04-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9df9931fae96 by R David Murray in branch '3.3': #15575: Clarify tutorial description of when modules are executed. http://hg.python.org/cpython/rev/9df9931fae96 New changeset dac847938326 by R David Murray in branch 'default': #15575: Clarify

[issue15575] Tutorial is unclear on multiple imports of a module.

2013-04-21 Thread R. David Murray
R. David Murray added the comment: Thanks, James. I wound up going with a different wording for the elaboration: since the concept of running a python file as a script is mentioned just a bit earlier, I added a parenthetical that the statements are also executed if the module is run as a

[issue17811] Improve os.readv() and os.writev() documentation and docstring

2013-04-21 Thread Nikolaus Rath
New submission from Nikolaus Rath: The os.writev and os.readv functions are currently documented as: os.writev(fd, buffers) Write the contents of buffers to file descriptor fd, where buffers is an arbitrary sequence of buffers. Returns the total number of bytes written. os.readv(fd,

[issue17812] Quadratic complexity in b32encode

2013-04-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: b32encode accumulates encoded data in a bytes object and this operation has quadratic complexity. Here is a patch, which fixes this issue by accumulating in a list. -- components: Library (Lib) files: base32_fix.patch keywords: patch messages:

[issue17811] Improve os.readv() and os.writev() documentation and docstring

2013-04-21 Thread Nikolaus Rath
Nikolaus Rath added the comment: Here's a first attempt at improvement based on my guess: os.writev(fd, buffers) Write the contents of buffers to file descriptor fd, where buffers is an arbitrary sequence of buffers. In this context, a buffer may be any Python object that provides a

[issue17812] Quadratic complexity in b32encode

2013-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And here are other patch, which not only fixes an issue with quadratic complexity, but optimize b32encode and b32decode about 2.5 times. Microbenchmarks: ./python -m timeit -r 1 -n 10 -s from base64 import b32encode as encode; data = open('python',

[issue17812] Quadratic complexity in b32encode

2013-04-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file29972/base32_optimize.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17812 ___

[issue17811] Improve os.readv() and os.writev() documentation and docstring

2013-04-21 Thread R. David Murray
R. David Murray added the comment: Well, the documentation is technically precise. I'd even managed to forget that buffer objects existed in Python2 :) As you observed, in Python3 a buffer is something that implements the buffer protocol. What I would do is link the word 'buffer' to

[issue17811] Improve os.readv() and os.writev() documentation and docstring

2013-04-21 Thread Nikolaus Rath
Nikolaus Rath added the comment: What section do you mean? bytearray is not mentioned anywhere in http://docs.python.org/3.4/library/os.html. I think the problem with just linking to the C API section is that it doesn't help people that are only using pure Python. You can't look at a Python

[issue17813] lzma and bz2 decompress methods lack max_size attribute

2013-04-21 Thread Nikolaus Rath
New submission from Nikolaus Rath: The zlib Decompress.decompress has a max_length parameter that limits the size of the returned uncompressed data. The lzma and bz2 decompress methods do not have such a parameter. Therefore, it is not possible to decompress untrusted lzma or bz2 data without

  1   2   >