[issue13386] Document documentation conventions for optional args

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: From Ezio's original post: ''' If a function has optional arguments but it doesn't accept keyword arguments, the func([arg1]) notation is used instead. ... The notation func([arg=default]) should never be used, and func([arg]) should

[issue13349] Uninformal error message in index() and remove() functions

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I found safe_repr() from Lib/unittest/util.py. The functions in Lib/unittest/util.py shouldn't be used outside unittest. We would require a similar function, just implemented in C. What is a good place to define such C helpers that

[issue13349] Uninformal error message in index() and remove() functions

2011-11-18 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Ezio Melotti wrote: You could start by adding it in the file where you need it. If it starts becoming useful elsewhere too, it can then be moved somewhere else. I would expect such function to be private, so we are free to move it whenever we

[issue13423] Ranges cannot be meaningfully compared for equality or hashed

2011-11-18 Thread Chase Albert
New submission from Chase Albert thaoe...@gmail.com: My expectation was that range(2,5) == range(2,5), and that they should hash the same. This is not the case. -- messages: 147838 nosy: rob.anyone priority: normal severity: normal status: open title: Ranges cannot be meaningfully

[issue13423] Ranges cannot be meaningfully compared for equality or hashed

2011-11-18 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: this was implemented with ticket #13201. It will be available in version 3.3. -- nosy: +flox resolution: - out of date stage: - committed/rejected status: open - closed superseder: - Implement comparison operators for range

[issue13424] Add examples for open’s new opener argument

2011-11-18 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: The new opener argument to open and TextIOWrapper closed two bugs on this tracker: using O_CLOEXEC and replacing the unofficial 'c' mode (O_CREATE). I think it’d be nice to have these as examples (maybe not in the docs of TextIOWrapper which

[issue12760] Add create mode to open()

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: See #13424 for a doc request about this. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12760 ___

[issue13424] Add examples for open’s new opener argument

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: s/TextIOWrapper/FileIO/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13424 ___ ___

[issue12797] io.FileIO and io.open should support openat

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: See #13424 for a doc request about this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12797 ___

[issue12780] Clean up tests for pyc/pyo in __file__

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Seems reasonable to me. When did/does unicodedata ever have a __file__ attribute? No idea. Maybe it has to do with static vs. dynamic linking? Or alternate VMs? -- ___ Python tracker

[issue2979] use_builtin_types in xmlrpc.server

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2979 ___ ___ Python-bugs-list

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Attached patch should solve the issue. -- assignee: - ezio.melotti keywords: +patch stage: test needed - commit review versions: +Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23721/issue13358.diff

[issue13294] http.server: HEAD request should not return a body

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hi Michele, long time no see :) Well, actually SimpleHTTPRequesthandler extends BaseHTTPHandler with basic do_GET and do_HEAD methods. Unittests for http.server shows that this behavior is intended, since: [snip] Not sure what this test

[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I did some tests, creating an element ('elem') that contains two adjacent text nodes ('text'). With my latest patch the prettyprint is: ?xml version=1.0 ? elem text text /elem Here both the text nodes are printed on a

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Stanisław Jankowski
New submission from Stanisław Jankowski stach.jankow...@gmail.com: http.client.HTTPMessage.getallmatchingheaders() always returns [] Python 3.2.2: Calling the code below does not give the expected result. sjankowski@sjankowski:~$ python3 Python 3.2.2rc1 (default, Aug 14 2011, 18:43:44) [GCC

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The problem seems to be in Lib/http/client.py:227. The code adds a ':' that is not found in the list of headers returned by self.keys(). -- nosy: +ezio.melotti ___ Python tracker

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13425 ___ ___ Python-bugs-list

[issue13426] The Python Standard Library 11. Data Persistence

2011-11-18 Thread Nebelhom
New submission from Nebelhom nebel...@googlemail.com: -- Python v3.3a0 documentation The Python Standard Library 11. Data Persistence Section 11.1 pickle module #1 11.1.3. Module Interface exception pickle.UnpicklingError Error raised when there a problem

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Actually the headers are already parsed, so the code should use self.items() instead of self.keys(), check if the key (without ':') matches, and append the key-value pair to the list. Having a list of key-value pairs seems more useful than

[issue13349] Uninformal error message in index() and remove() functions

2011-11-18 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Please don't stress too much about providing an indication that the repr has been truncated - it's an error message, not part of the normal program output. Besides, the lack of a closing ')', ']', '}' or '' will usually indicate something is

[issue13427] string comparison with ==

2011-11-18 Thread Alan Beccati
New submission from Alan Beccati alan.becc...@gmail.com: Hello, did I discover a python string comparison bug or is this behaviour expected and I am doing something wrong? This is the code I run: for line in lines[4:]: currColl=line.split(:)[1].strip() print

[issue13427] string comparison with ==

2011-11-18 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: collName is probably not what you expect. You can print repr(collName), repr(currColl) to verify this. It is not a bug on Python side. -- nosy: +flox resolution: - works for me stage: - committed/rejected status: open -

[issue13426] The Python Standard Library 11. Data Persistence

2011-11-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset ce34e9223450 by Ezio Melotti in branch '2.7': #13426: fix typo in pickle doc. http://hg.python.org/cpython/rev/ce34e9223450 New changeset 1f31061afdaf by Ezio Melotti in branch '3.2': #13426: fix typos in pickle

[issue13426] The Python Standard Library 11. Data Persistence

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This is fixed now, thanks for the report! Regarding #4, sqlite3 is included in the official installer provided for Windows, so that shouldn't be a problem. Regarding the output, I don't think is necessary to add it. The example is fairly

[issue13428] PyUnicode_FromFormatV: support width and precision for string codes, e.g %S and %R

2011-11-18 Thread Petri Lehtinen
New submission from Petri Lehtinen pe...@digip.org: Currently, the width and precision information for string codes are accepted but ignored. They should be used to pad short strings (width) and truncate long ones (precision), just like printf() (only in terms of code points rather than

[issue13349] Uninformal error message in index() and remove() functions

2011-11-18 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Nick Coghlan wrote: Please don't stress too much about providing an indication that the repr has been truncated - it's an error message, not part of the normal program output. Besides, the lack of a closing ')', ']', '}' or '' will usually

[issue13428] PyUnicode_FromFormatV: support width and precision for string codes, e.g %S and %R

2011-11-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Duplicate of #7330. -- nosy: +haypo resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13428

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2011-11-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Issue #13428 has been marked as a duplicate of this issue. -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330

[issue13427] string comparison with ==

2011-11-18 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13427 ___ ___

[issue13426] Typos in pickle docs

2011-11-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo title: The Python Standard Library 11. Data Persistence - Typos in pickle docs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13426

[issue13426] The Python Standard Library 11. Data Persistence

2011-11-18 Thread Nebelhom
Nebelhom nebel...@googlemail.com added the comment: Hi Ezio, Regarding the output, I don't think is necessary to add it. I left it in because of a discussion in core-mentorship, where they mentioned that it would be beneficial to have it in. I pasted the exchange below if you are interested.

[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Here is a new patch. -- Added file: http://bugs.python.org/file23722/issue6570-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6570

[issue13125] test_all_project_files() expected failure

2011-11-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13125 ___ ___ Python-bugs-list

[issue10772] Several actions for argparse arguments missing from docs

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10772 ___ ___ Python-bugs-list

[issue10772] Several actions for argparse arguments missing from docs

2011-11-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10772 ___ ___

[issue4508] distutils compiler not handling spaces in path to output/src files

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Ok, I found a similar problem with MMTK. I don’t know what that is. I am currently altering my distutils package to add a function called nt_quote_dir that adds quotes to paths with spaces and then applies it to each path if the platform

[issue13294] http.server: HEAD request should not return a body

2011-11-18 Thread Michele Orrù
Michele Orrù maker...@gmail.com added the comment: These tests shows how SimpleHTTPRequestHandler behaves: if the class contains a do_FOO method, it is called, otherwise error501 is raised. That's what Karl said with «Or to modify the library code that for any resources not yet defined.». Since

[issue13427] string comparison with ==

2011-11-18 Thread Alan
Alan alan.becc...@gmail.com added the comment: Using repr highlights the issue which lies in the behaviour of str.strip() which does not strip away null spaces as I would have expected: ' 'utm10\x00' ' == ' 'utm10' ' not equal Changing the code to: currColl=line.split(:)[1].strip().strip(\0)

[issue13420] newer() function in dep_util.py discard changes in the same second

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hi David. Thanks for reporting the issue. I have to warn you that there is a high bar for distutils changes; due to the mass of code out there that relies on undocumented internal behavior or works around old bugs, a feature freeze is in

[issue13427] string comparison with ==

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Nope, str.strip only strips whitespace, and \x00 is not considered whitespace: '\x00'.isspace() False -- nosy: +ezio.melotti resolution: works for me - invalid ___ Python tracker

[issue13294] http.server: HEAD request should not return a body

2011-11-18 Thread Michele Orrù
Michele Orrù maker...@gmail.com added the comment: As Ezio just pointed out, strip('\r\n') is still behaves differently from the previous code. Sorry for that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13294

[issue13420] newer() function in dep_util.py discard changes in the same second

2011-11-18 Thread David Amian
David Amian dam...@emergya.com added the comment: sorry, I didn't explain well. I've a project, in the setup.py file, I've a function called update_prefix, that updates the 'path_project' variable with prefix arguments from setup.py If you runs setup.py with --prefix=/usr, then the file in

[issue13426] Typos in pickle docs

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Regarding the output, I don't think is necessary to add it. I left it in because of a discussion in core-mentorship, where they mentioned that it would be beneficial to have it in. Well, people can have diverging opinions. Terry’s was that

[issue13424] Add examples for open’s new opener argument

2011-11-18 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13424 ___ ___

[issue12779] Update packaging documentation

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I worked on this a bit more and the current boring diff has more than 1000 deleted lines and more than 1000 added lines. After thinking about it, maybe I should not make a mega-patch with markup/boring changes first but rather fix markup as

[issue13420] newer() function in dep_util.py discard changes in the same second

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I've a project, in the setup.py file, I've a function called update_prefix, that updates the 'path_project' variable with prefix arguments from setup.py If you runs setup.py with --prefix=/usr, then the file in

[issue4442] document immutable type subclassing via __new__

2011-11-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4442 ___ ___ Python-bugs-list

[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2011-11-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4395 ___ ___ Python-bugs-list

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-18 Thread sbt
sbt shibt...@gmail.com added the comment: Thanks again. Just a nit: the tests should be in MiscIOTest, since they don't directly instantiate the individual classes. Also, perhaps it would be nice to check that the exception's errno attribute is EAGAIN. Done. -- Added file:

[issue13388] document hg commit hooks in the devguide

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The commit details (including its changeset, branch and commit message) In Mercurial terminology, a changeset *is* a commit (or if you really want to make a distinction, a commit is the action that creates a changeset). I think you meant

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: It's made my day. I get to boast at school now! You could do more of that if you got a patch committed! See http://docs.python.org/devguide and http://mail.python.org/mailman/listinfo/core-mentorship for more info if you’re interested.

[issue13292] missing versionadded for bytearray

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for cleaning up the reports. I’m not a numbers person :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13292 ___

[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7262f8f276ff by Ezio Melotti in branch '2.7': #4147: minidom's toprettyxml no longer adds whitespace around a text node when it is the only child of an element. Initial patch by Dan Kenigsberg.

[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I committed my patch with a few more tests. This should be fixed now. Thanks for the report and the patch! -- resolution: - fixed stage: commit review - committed/rejected status: open - closed

[issue13429] provide __file__ to extension init function

2011-11-18 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: In Python modules, the top-level module code sees the __file__ variable and can use it to refer to resources in package subdirectories, for example. This is not currently possible in extension modules, because __file__ is only set

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Marko Nervo
New submission from Marko Nervo ma...@python.it: I think it would be very usefull to add a curry function to the functools module. It should be like this. def curry(func, *args, **kwargs): if (len(args) + len(kwargs)) = func.__code__.co_argcount: return func(*args, **kwargs)

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 91163aa3d5b4 by Ezio Melotti in branch '2.7': #13358: HTMLParser now calls handle_data only once for each CDATA. http://hg.python.org/cpython/rev/91163aa3d5b4 New changeset 0a32e7e3aa1f by Ezio Melotti in branch

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This should be fixed now, let me know if you find other problems with the parser. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This sounds similar to http://wiki.python.org/moin/PythonDecoratorLibrary#Pseudo-currying Do you have a concrete use case for this? -- nosy: +ezio.melotti versions: +Python 3.3 -Python 2.7, Python 3.4

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: You can use functools.partial for similar effect. Not sure what a dedicated curry() primitive would improve. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: This already exists, as functools.partial: http://docs.python.org/library/functools.html#functools.partial -- nosy: +alex resolution: - invalid status: open - closed ___ Python tracker

[issue13429] provide __file__ to extension init function

2011-11-18 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- keywords: +patch nosy: +loewis Added file: http://bugs.python.org/file23725/ext_module_init_file_path.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13429

[issue9614] _pickle is not entirely 64-bit safe

2011-11-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +brian.curtin stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9614 ___

[issue13429] provide __file__ to extension init function

2011-11-18 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Here is an extension to the patch that implements the protocol also for extension module reinitialisation, so that the module creation can also set __file__ and the proper package in that case. Currently without tests (and users, I

[issue3430] httplib.HTTPResponse documentations inconsistent

2011-11-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti resolution: accepted - versions: +Python 3.3 -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3430

[issue10469] test_socket fails using Visual Studio 2010

2011-11-18 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: I can also confirm that this patch corrects the problem with test_asyncore for Python 2.7 built with VS2010. -- nosy: +sable ___ Python tracker rep...@bugs.python.org

[issue11112] UDPTimeoutTest derives from SocketTCPTest

2011-11-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 0fdf7f7c353d by Ezio Melotti in branch '2.7': #2: Fix typo in a base class in test_socket. http://hg.python.org/cpython/rev/0fdf7f7c353d New changeset b410bcd300a1 by Ezio Melotti in branch '3.2': #2: Fix

[issue10469] test_socket fails using Visual Studio 2010

2011-11-18 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: FYI: this would likely be handled through #13210. I have a conversion sandbox started at http://hg.python.org/sandbox/vs2010port/ and am working through fixing test failures after the initial conversion. --

[issue11112] UDPTimeoutTest derives from SocketTCPTest

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the report! -- assignee: - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: needs patch - committed/rejected status: open - closed versions: -Python 3.1 ___ Python

[issue11107] Cache constant slice instances

2011-11-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11107 ___ ___

[issue13210] Support Visual Studio 2010

2011-11-18 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: I mentioned this on another issue, but I created a clone at http://hg.python.org/sandbox/vs2010port/. I've already gone through the port in the past but wasn't able to release the code at the time. As I work through it, I'll occasionally

[issue13210] Support Visual Studio 2010

2011-11-18 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Thanks. I was going to ask about this to see if anyone had already done the legwork. -- nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13210

[issue10980] http.server Header Unicode Bug

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Now it's too late for 3.1, should this still go to 2.7? -- nosy: +ezio.melotti versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10980

[issue10980] http.server Header Unicode Bug

2011-11-18 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Please. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10980 ___ ___ Python-bugs-list

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Marko Nervo
Marko Nervo ma...@python.it added the comment: In [1]: import functools In [2]: def adder(x, y, z): ...: return (x + y + z) ...: In [3]: adder = functools.partial(adder) In [4]: adder(2)(3)(4) --- TypeError

[issue13387] suggest assertIs(type(obj), cls) for exact type checking

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed. -- assignee: docs@python - ezio.melotti resolution: - fixed stage: needs patch - committed/rejected status: open - closed versions: +Python 2.7, Python 3.2 ___ Python tracker

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: To go back to your original message: I think it would be very usefull to add a curry function to the functools module. For what use cases? Curried functions could be used as follow. adder(2, 3, 4) adder(2, 3)(4) adder(2)(3)(4) adder(z =

[issue13387] suggest assertIs(type(obj), cls) for exact type checking

2011-11-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset fd9d7a8e45bc by Ezio Melotti in branch '2.7': #13387: add note about checking the exact type in assertIsInstance doc. http://hg.python.org/cpython/rev/fd9d7a8e45bc New changeset 583aff635ce1 by Ezio Melotti in

[issue2286] Stack overflow exception caused by test_marshal on Windows x64

2011-11-18 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: I had the exact same problem when compiling the Python 2.7 branch with Visual Studio 2010. In debug mode and 64 bits, python will crash on test_loads_recursion in test_marshal and on the code provided in msg63536. Could you

[issue10227] Improve performance of MemoryView slicing

2011-11-18 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Updated single slice caching patch for latest Py3.3 hg tip. -- Added file: http://bugs.python.org/file23727/slice-object-cache.patch ___ Python tracker rep...@bugs.python.org

[issue13387] suggest assertIs(type(obj), cls) for exact type checking

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: + To check for a specific type (without including superclasses) use + :func:`assertIs(type(obj), cls) assertIs`. Don’t you mean “without accepting subclasses”, not superclasses? -- ___ Python tracker

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: FWIW there is a somewhat related thread that proposed a new syntax for curried functions: http://mail.python.org/pipermail/python-ideas/2009-March/003220.html -- stage: - committed/rejected ___

[issue13429] provide __file__ to extension init function

2011-11-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I suppose that the value of _Py_ModuleImportContext is protected by the import lock? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13429

[issue13387] suggest assertIs(type(obj), cls) for exact type checking

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: + To check for a specific type (without including superclasses) use + :func:`assertIs(type(obj), cls) assertIs`. Don’t you mean “without accepting subclasses”, not superclasses? I mean: class MyInt(int): pass # my specific type ...

[issue10980] http.server Header Unicode Bug

2011-11-18 Thread Armin Ronacher
Armin Ronacher armin.ronac...@active-4.com added the comment: 2.7 does not suffer from this since 2.7 does not support unicode in headers. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10980

[issue13404] Add support for system.methodSignature() to XMLRPC Server

2011-11-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13404 ___ ___ Python-bugs-list

[issue2286] Stack overflow exception caused by test_marshal on Windows x64

2011-11-18 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: I don't have the issue anymore when bumping the stack size to 230. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2286

[issue13397] Option for XMLRPC clients to automatically transform Fault exceptions into standard exceptions

2011-11-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13397 ___ ___ Python-bugs-list

[issue2286] Stack overflow exception caused by test_marshal on Windows x64

2011-11-18 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- components: +Windows nosy: +brian.curtin status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2286 ___

[issue13429] provide __file__ to extension init function

2011-11-18 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I don't know how the import lock applies here. Would it have to be protected by it? The lifetime is restricted to the call of the extension module init function, and its value is saved recursively if the init function triggers

[issue13429] provide __file__ to extension init function

2011-11-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But the GIL can be released in many places (e.g. a Py_DECREF), and another thread can enter the same function and update the same static variable. -- ___ Python tracker

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Marko Nervo
Marko Nervo ma...@python.it added the comment: I totally disagree with the syntax for curried function, but I think a curry function is perfect for the functools module and I also think it could be useful at least as functools.partial. In addition, a lot of languages support currying, such as

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: However, here an example less confusional adder = curry(lambda (x, y): (x + y)) adder3 = adder(3) adder3(4) 7 adder3(5) 8 Currying let you defining new functions on other functions. But so does functools.partial. So the question

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: In that thread Guido said: Haskell has this too, perhaps even more extreme: there's not really such a thing in Haskell as a function of N arguments (N 1). f a b = ... defines a function f of one argument a which returns another function (f

[issue10227] Improve performance of MemoryView slicing

2011-11-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset fa2f8dd077e0 by Antoine Pitrou in branch 'default': Issue #10227: Add an allocation cache for a single slice object. http://hg.python.org/cpython/rev/fa2f8dd077e0 -- nosy: +python-dev

[issue10227] Improve performance of MemoryView slicing

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks Stefan. I'm leaving the issue open since the original topic is a bit different. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10227

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks. Who should I credit? sbt? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13322 ___ ___

[issue9614] _pickle is not entirely 64-bit safe

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This issue is obsolete, there are no 64-bit warnings in _pickle.c anymore. See issue 11564. -- resolution: - out of date stage: patch review - committed/rejected status: open - closed ___ Python

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Marko Nervo
Marko Nervo ma...@python.it added the comment: But so does functools.partial. So the question is, what use case does it help that functools.partial doesn't? Sure, it's common `defining new functions on other functions`... more times. Here a stupid example with fold (our reduce). @curry def

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Sure, it's common `defining new functions on other functions`... more times. Here a stupid example with fold (our reduce). @curry def fold(function, start, sequence): if len(sequence) == 0: return start else:

  1   2   >