[issue4842] int('3L') still valid in Python 3.0

2009-01-05 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Consider marking the 'L' code as deprecated and removing it in 3.1; otherwise, this artifact may hang around forever. ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-05 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Quick notes so I don't forget: The two main pure python equivalents in the docs would need to be updated with the new special cases (currently they raise IndexError for rn). The other two pure python equivalents would

[issue2897] include structmember.h in Python.h

2009-01-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Martin, do you want to make the call on this one? -- assignee: - loewis nosy: +loewis, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2897

[issue2772] Add PendingDeprecationWarning for % formatting

2009-01-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Am closing this one. It is pointless and counter-productive unless there is a firm decision that % formatting is definitely going away (and migration tools have been developed). Right now, it looks like there is some chance

[issue2121] complex constructor doesn't accept string with nan and inf

2009-01-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Mark, I'm somewhat uncomfortable with your proposal also. It changes what the parser will accept and the potential benefits are almost nil. Also, putting NaNs and Infs in complex numbers is probably not something that should

[issue4858] Deprecation of MD5

2009-01-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Because MD5 is used widely, Python needs to support it, if only to be able to verify MD5 signatures when offered. -- nosy: +rhettinger resolution: - rejected status: open - closed

[issue4858] Deprecation of MD5

2009-01-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Secure hash or cryptographic hash is the correct term and I think we should leave that in, if only to make the original intent clear and to make them easier to search for. I propose adding a sentence to the first paragraph

[issue4869] random.expovariate(0.0)

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I concur with Mark. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4869

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: 1. This is the most important issue. Is the rn case typically an error in the user's program or thought process. If so, then the utility of a ValueError can be weighed against the utility of other cases where you want combs

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Another thought before I forget: The piecewise definition of the choose function or for binomial coefficients suggests that supporting the rn case should be accompanied by supporting the r0 case

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: David, thanks for the data point. What does it return for In[1]:= Permutations[{a, b, c}, {-1}] ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4816

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Data point: Microsoft Excel's PERMUT() and COMBIN() return #NUM! for rn or r0. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4816

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Excel is returning the count, not the set itself. So, it could have chosen to return zero. The HP32SII also has nCr and nPr functions that return INVALID DATA for rn or r0. The Combinatorics section of CRC Standard

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Summary of functions/definitions expected to return a number: rn r0 Source - -- -- error error MS Excel PERMUT() and COMBIN() error error

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: David, I know the OPs position and Mark's opinion. What is your recommendation for the rn case and the r0 case? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4816

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Attached an updated patch which expands the tests and docs. Handles the rn case with an empty result. Leaves the r0 case as a ValueError. Am thinking that if we do this, it should be treated as a bug and posted to 2.6 and 3.0

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Added file: http://bugs.python.org/file12642/combperm2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4816

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Removed file: http://bugs.python.org/file12640/combperm.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4816

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Thanks David. Looks like we're all in agreement. Turns out, I did a weeks worth of mulling today ;-) Accepting the proposal with the following rationale: 1. There exist some valid use cases where rn. 2. Returning an empty

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Added file: http://bugs.python.org/file12644/combperm3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4816

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Removed file: http://bugs.python.org/file12642/combperm2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4816

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Added file: http://bugs.python.org/file12647/combperm4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4816

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Removed file: http://bugs.python.org/file12644/combperm3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4816

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Fixed in r68394 Will forward port in a day or two. -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4816

[issue4888] misplaced (or misleading) assert in ceval.c

2009-01-08 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: IIRC, I think I put this here a long while ago when replacing or removing a corresponding if-test that had always been compiled-in. The assertion was a way of validating that the refactoring and elimination of tests had

[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Attaching an updated patch for Py2.7. * Kept OP's simple constructor call but renamed it from counts() to Counter(): item_counts = Counter('acabbacba') * Followed Guido's advice and avoided subclassing from defaultdict

[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Added a few more in-module tests. Added file: http://bugs.python.org/file12664/counter2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1696199

[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Removed file: http://bugs.python.org/file12662/counter.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1696199

[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Added file: http://bugs.python.org/file12665/counter3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1696199

[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Removed file: http://bugs.python.org/file12664/counter2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1696199

[issue4888] misplaced (or misleading) assert in ceval.c

2009-01-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I wasn't opposing the patch. Just wanted to look back at why the assertion was put there in the first place. If you want it in, go ahead. -- assignee: rhettinger - ___ Python

[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The counts/counter moniker emerged from the python-dev discussion and I'm basically happy with it since the typical usage is c=Counter(myseq) with no other non-dict accesses (mostly just c[elem]+=1 and print c[elem]). It's

[issue4899] doctest should support fixtures

2009-01-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I concur with David. This is not in the spirit of the doc test module. We already have the heavy-weight unittest module as an alternative when more firepower is needed. Also, adding more infra-structure to the this already

[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Added file: http://bugs.python.org/file12671/counter4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1696199

[issue2486] Recode (parts of) decimal module in C

2009-01-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, I'm currently seeking project sponsorship to work on this. To do it right, a substantial portion of the module should be coded in C and needs to function independently of Python, with accessors provided to for Python

[issue4796] Decimal to receive from_float method

2009-01-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Go ahead with the update, but it isn't really necessary. The PEPs are for getting something into the language in the first place and for centralizing a major discussion. They typically get out of date quickly after they've

[issue1696199] Add collections.counts()

2009-01-12 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Georg, could you give this a once over before I commit? Thanks. -- assignee: rhettinger - georg.brandl nosy: +georg.brandl Added file: http://bugs.python.org/file12695/counter5.diff

[issue1696199] Add collections.counts()

2009-01-12 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Attaching an update with improved docs. Thanks for looking at this. Added file: http://bugs.python.org/file12702/counter6.diff ___ Python tracker rep...@bugs.python.org http

[issue4920] Inconsistent usage of next/__next__ in ABC collections; collections.Iterator is not compatible with Python 2.6 iterators.

2009-01-12 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Good catch! -- nosy: +rhettinger priority: - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4920

[issue1696199] Add collections.counts()

2009-01-12 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Thanks for the review comments. Incorporated all suggested changes and did some other minor tidying-up. Extended the update example to include c.update(Counter('abcdee')). Committed as r68559 . Decided to leave __repr__

[issue4922] set.add and set.discard are not conformant to collections.MutableSet interface

2009-01-13 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The comments were incorrect. Mutating methods always return None. Fixed in r68570. Needs to be ported to 2.6, 3.0, and 3.1. -- assignee: rhettinger - georg.brandl keywords: +26backport nosy: +georg.brandl resolution

[issue4940] decimal.Decimal.__init__ should raise an instance of ValueError

2009-01-13 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Sorry, the decimal world has it's own little world of precisely defined and spec-mandated exceptions. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http

[issue4715] optimize bytecode for conditional branches

2009-01-13 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, the goal is to replace the opcode peephole optimizer with a more powerful equivalent working on the AST just prior to code generation. -- nosy: +rhettinger ___ Python tracker

[issue4948] Make heapq work with all mutable sequences

2009-01-14 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This was discussed at the outset and the decision was a conscious one. Do you have any particular use cases in mind (what other mutable sequences do you reach for when you need a heap)? Or is this just a general discussion

[issue4948] Make heapq work with all mutable sequences

2009-01-14 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: array.array is terribly slow. It is optimized for space, not speed. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4948

[issue4933] Patch to add preliminary support for Haiku

2009-01-14 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, I've launched a discussion on python-dev. If the OP is willing to maintain the deltas over a long period of time (and perhaps provide a buildbot for Haiku), then I fully support his effort. -- nosy: +rhettinger

[issue1242657] list(obj) can swallow KeyboardInterrupt

2009-01-14 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Here's a patch that fixes-up length_hint and it's internal callers. I think there are plenty of other places that also swallow exceptions but will leave those for someone who wants to look at every instance of PyErr_Clear

[issue1242657] list(obj) can swallow KeyboardInterrupt

2009-01-15 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Anyone else want to pick this up from here? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1242657

[issue4998] __slots__ on Fraction is useless

2009-01-19 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Arghh! Decimal is NOT supposed to inherit or register with numbers. Guido has pronounced on this and we've discussed it multiple times. See the comments in numbers.py which were supposed to serve as a reminder. Decimals

[issue4998] __slots__ on Fraction is useless

2009-01-19 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Fixed the decimal issue in r68800 and r68799 . Still needs a fix to Fractions, preferably adding an empty __slots__ to all levels of numbers.py. ___ Python tracker rep...@bugs.python.org

[issue4998] __slots__ on Fraction is useless

2009-01-20 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: jyasskin - marketdickinson keywords: +patch priority: release blocker - critical type: - behavior versions: +Python 2.6, Python 2.7, Python 3.1 Added file: http://bugs.python.org/file12810/fractions.diff

[issue4998] __slots__ on Fraction is useless

2009-01-20 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Fixed in the trunk: r68813. Benjamin, can you please apply to 2.6, 3.0 and 3.1. -- assignee: rhettinger - benjamin.peterson resolution: - fixed ___ Python tracker rep

[issue5032] itertools.count step

2009-01-22 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger components: +Extension Modules -None nosy: +rhettinger priority: - low versions: +Python 2.7, Python 3.1 -Python 3.0 ___ Python tracker rep...@bugs.python.org

[issue5034] itertools.fixlen

2009-01-22 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5034

[issue5034] itertools.fixlen

2009-01-22 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Am taking this under advisement but am initially disinclined. It is not a basic itertool since it can be composed from the others. Also, it's use cases seem to be few. One challenge for the module is that adding more tools

[issue5032] itertools.count step

2009-01-22 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Am not too excited about this one. As a heavy itertools user myself, I've never had occasion to need a step argument. As an implementer, I'm aware that it would make the code for count() much more complex (because

[issue4999] multiprocessing.Queue does not order objects

2009-01-22 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The Queue module design should be followed as closely as possible. It provides FIFO order as the default, with options for LIFO and priority order. -- nosy: +rhettinger ___ Python

[issue5034] itertools.fixlen

2009-01-24 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Am still leaning towards rejecting this one based on: * paucity of use cases * non-atomicity (it can be built-out of existing tools) * minimizing the number of tools in the toolkit * not convinced that padded tuple unpacking

[issue5048] Extending itertools.combinations

2009-01-24 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Do you have compelling use cases? Is it worth what it takes to preserve the relation with permuations() and product() and the lexicographic orderings? Do we care the length of the output is no longer predictable by a simple

[issue5048] Extending itertools.combinations

2009-01-24 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Guido disallowed returning a len method on iterators. He expected bool(it) to be False. The recipes section of the itertools docs has code for combinations_with_replacement(). It was not included originally because

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: +1 on this idea -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4285

[issue5048] Extending itertools.combinations

2009-01-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: There is already a powerset() recipe in the docs. It was contributed by Eric Raymond. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5048

[issue5048] Extending itertools.combinations

2009-01-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Am rejecting the OP's request for the reasons cited. Also rejecting the request for a __len__ method on permutations. Ezio or Mark, please open another feature request for combinations_with_replacement() and assign to me

[issue2459] speedup for / while / if with better bytecode

2009-01-26 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Reminder, make sure we can still break out of a while 1: pass. -- nosy: +rhettinger versions: +Python 2.7, Python 3.1 -Python 2.6 ___ Python tracker rep...@bugs.python.org http

[issue5065] IDLE improve Subprocess Startup Error message

2009-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5065

[issue5048] Extending itertools.combinations

2009-01-26 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, I added combinations_with_replacement() in r69001 and r69004 . ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5048

[issue1498370] Improve itertools.starmap

2009-01-26 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This was fixed in r60013. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1498370

[issue5034] itertools.fixlen

2009-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5034

[issue2527] Pass a namespace to timeit

2009-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2527

[issue1242657] list(obj) can swallow KeyboardInterrupt

2009-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1242657

[issue4920] Inconsistent usage of next/__next__ in ABC collections; collections.Iterator is not compatible with Python 2.6 iterators.

2009-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4920

[issue5021] doctest.testfile should set __name__, can't use namedtuple

2009-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5021

[issue1397474] timeit execution enviroment

2009-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: fdrake - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1397474

[issue5021] doctest.testfile should set __name__, can't use namedtuple

2009-01-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: r69014 and r69015. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5021

[issue5021] doctest.testfile should set __name__, can't use namedtuple

2009-01-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Also r69016 and r69017. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5021

[issue1242657] list(obj) can swallow KeyboardInterrupt

2009-01-27 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1242657

[issue5032] itertools.count step

2009-01-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I've looked again at what it would take to update the C code and think that the optimizations there make it difficult to add this feature without adding a lot of code complexity and without slowing-down the common case. Also

[issue5048] Extending itertools.combinations

2009-01-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Glad you like it. Will meditate for a bit on the floating point input. My first thought is that it isn't worth going through the __index__ dance to preclude inputs that look odd

[issue5048] Extending itertools.combinations

2009-01-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Correction to earlier statement. It should have read: Guido disallowed returning a len method on iterators. He expected bool(it) to be always be True. ___ Python tracker rep

[issue4707] round(25, 1) should return an integer, not a float

2009-01-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Someone ought to ping Guido on this. He may have some strong thoughts on the signature (having it sometimes return ints and sometimes floats). But in this case, accuracy may be the more important consideration

[issue4707] round(25, 1) should return an integer, not a float

2009-01-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Guido, do you have any thoughts on this? Basically, it's a choice between giving round() a weird signature (sometimes returning floats and sometimes int/longs) versus having accurate roundings of integers (which become

[issue4707] round(25, 1) should return an integer, not a float

2009-01-28 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: It's settled then. Input type dictates output type. No dependency on the actual values. -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http

[issue4707] round(25, 1) should return an integer, not a float

2009-01-28 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4707

[issue4920] Inconsistent usage of next/__next__ in ABC collections; collections.Iterator is not compatible with Python 2.6 iterators.

2009-01-28 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Fixed in r69070 and r69071. Thanks for the bug report and patch! -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4920

[issue4920] Inconsistent usage of next/__next__ in ABC collections; collections.Iterator is not compatible with Python 2.6 iterators.

2009-01-28 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4920

[issue4948] Make heapq work with all mutable sequences

2009-01-28 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: With no compelling use cases, it's not worth slowing down the module. Am sticking with the original design decision. -- resolution: - rejected status: open - closed ___ Python

[issue1717] Get rid of more references to __cmp__

2009-01-29 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: For 3.0, are you going to keep tp_compare slot in existence and just assert that it is NULL? Then in 3.1, remove the slot entirely? ___ Python tracker rep...@bugs.python.org http

[issue3783] dbm.sqlite proof of concept

2009-01-29 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Am also working on a patch for this and would like to coordinate. My first draft is attached: Added file: http://bugs.python.org/file12891/tmp_dev_shelver.py ___ Python tracker rep

[issue3783] dbm.sqlite proof of concept

2009-01-29 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Thanks for looking at this. I'll do an update in the next few days. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3783

[issue3783] dbm.sqlite proof of concept

2009-01-30 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3783

[issue3783] dbm.sqlite proof of concept

2009-01-30 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Added file: http://bugs.python.org/file12896/dbsqlite.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3783

[issue4124] Patch for adding default to itemgetter and attrgetter

2009-01-30 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Will take a look at it next week. -- assignee: - rhettinger nosy: +rhettinger type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4124

[issue4124] Patch for adding default to itemgetter and attrgetter

2009-01-30 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Am curious about your use cases. ISTM that in every case I've every used either function, I've always known that the attribute or item is going to be there. For instance, the original motivating use cases were to support

[issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim

2009-02-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I don't see a problem with Untabify. IDLE cannot know how big you intended your tabs to be, so it presents a dialog asking you. That seems reasonable to me. In most cases, the default is pretty good -- it attempts to infer

[issue5134] Compiler warnings in sqlite module

2009-02-02 Thread Raymond Hettinger
New submission from Raymond Hettinger rhettin...@users.sourceforge.net: From a compilation of Py3.1 r69209 : ..\..\..\sqlite-3.5.9\sqlite3.c(9702) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9703) : warning C4244

[issue1242657] list(obj) can swallow KeyboardInterrupt

2009-02-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Thanks for the review. Fixed in r69227. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1242657

[issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim

2009-02-02 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - kbk nosy: +kbk priority: - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5129

[issue5133] Error with Eval

2009-02-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: They don't crash. They raise a SyntaxError because the 08 and 09 are invalid octal literals. If you're working with decimal literals that are padded on the left with zeroes, those need to be stripped off before conversion

[issue5137] SystemError when __len__ returns a non-number

2009-02-02 Thread Raymond Hettinger
New submission from Raymond Hettinger rhettin...@users.sourceforge.net: len(obj) is not happy when obj.__len__() returns a non-number. -- files: crasher_len.py messages: 81024 nosy: rhettinger priority: release blocker severity: normal status: open title: SystemError when __len__

[issue5138] File Reload for IDLE

2009-02-02 Thread Raymond Hettinger
New submission from Raymond Hettinger rhettin...@users.sourceforge.net: IDLE would be *much* easier to use in conjunction with version control if there were a reload option that did the equivalent of (close current with no save, followed by open current file). -- assignee: kbk

<    6   7   8   9   10   11   12   13   14   15   >