[issue455405] operator TypeErrors

2022-04-10 Thread admin
Change by admin : -- github: None -> 35049 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46141] Fix ipaddress.ip_network TypeErrors

2022-01-08 Thread Tal Einat
Change by Tal Einat : -- nosy: +pmoody, taleinat stage: -> patch review status: pending -> open versions: -Python 3.8 ___ Python tracker ___

[issue46141] Fix ipaddress.ip_network TypeErrors

2021-12-20 Thread Bar Harel
Change by Bar Harel : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46141] Fix ipaddress.ip_network TypeErrors

2021-12-20 Thread Bar Harel
severity: normal status: open title: Fix ipaddress.ip_network TypeErrors type: behavior versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46

[issue39720] Signature.bind TypeErrors could be more helpful

2020-02-21 Thread Frazer McLean
ument: 'kw_only'", if this would be accepted. -- components: Library (Lib) messages: 362439 nosy: RazerM priority: normal severity: normal status: open title: Signature.bind TypeErrors could be more helpful type: enhancement ___ Python track

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2018-04-16 Thread Jason R. Coombs
Jason R. Coombs added the comment: I believe I encountered this issue today on Python 2.7.14 (https://ci.appveyor.com/project/jaraco/jaraco-windows/build/31/job/lenh5l4dcmj137b9). In this case, I have an iterable (in itertools.imap) that raises a TypeError when evaluated,

[issue31071] *args unpacking can mask TypeErrors

2017-08-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31071] *args unpacking can mask TypeErrors

2017-08-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 946a0b69e217ff22a6c056047eab42053e9a2d5f by Serhiy Storchaka in branch '3.6': [3.6] bpo-31071: Avoid masking original TypeError in call with * unpacking (GH-2957) (#2991)

[issue31071] *args unpacking can mask TypeErrors

2017-08-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3030 ___ Python tracker ___ ___

[issue31071] *args unpacking can mask TypeErrors

2017-08-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 25e4f779d7ae9f37a1933cb5cbfad06e673c01f9 by Serhiy Storchaka in branch 'master': bpo-31071: Avoid masking original TypeError in call with * unpacking (#2957) https://github.com/python/cpython/commit/25e4f779d7ae9f37a1933cb5cbfad06e673c01f9

[issue31071] *args unpacking can mask TypeErrors

2017-07-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka components: +Interpreter Core nosy: +serhiy.storchaka stage: needs patch -> patch review ___ Python tracker

[issue31071] *args unpacking can mask TypeErrors

2017-07-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3005 ___ Python tracker ___ ___

[issue31071] *args unpacking can mask TypeErrors

2017-07-28 Thread R. David Murray
eError: foo() argument after * must be an iterable, not generator >>> foo(*foo()) Traceback (most recent call last): File "", line 1, in File "", line 2, in foo TypeError: fake -- nosy: +r.david.murray stage: -> needs patch title: Bad error message abo

[issue29905] TypeErrors not formatting values correctly

2017-06-10 Thread STINNER Victor
STINNER Victor added the comment: It seems like the bug has been fixed in all branches, so I close the issue. -- components: +asyncio resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 ___ Python

[issue29905] TypeErrors not formatting values correctly

2017-06-09 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +2122 ___ Python tracker ___ ___

[issue29905] TypeErrors not formatting values correctly

2017-06-09 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +2121 ___ Python tracker ___ ___

[issue29905] TypeErrors not formatting values correctly

2017-04-04 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- pull_requests: +1166 ___ Python tracker ___

[issue29905] TypeErrors not formatting values correctly

2017-04-04 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: As per #issue25002 and, specifically #msg250151, the TypeError in `asynchat` should probably not be included, I'll just make a PR for the TypeError in asyncio/proactor_events -- ___ Python tracker

[issue29905] TypeErrors not formatting values correctly

2017-03-25 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- pull_requests: +725 ___ Python tracker ___ ___

[issue29905] TypeErrors not formatting values correctly

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +giampaolo.rodola, haypo, josiahcarlson, stutzbach, yselivanov ___ Python tracker ___

[issue29905] TypeErrors not formatting values correctly

2017-03-25 Thread Jim Fasarakis-Hilliard
nosy: Jim Fasarakis-Hilliard priority: normal severity: normal status: open title: TypeErrors not formatting values correctly type: behavior versions: Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-04-16 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-04-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset eef8f72ddb00 by Martin Panter in branch '2.7': Issue #4806: Avoid masking TypeError when *-unpacking a generator https://hg.python.org/cpython/rev/eef8f72ddb00 -- ___ Python tracker

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-02-15 Thread Michel Desmoulin
Michel Desmoulin added the comment: We fixed our bug days ago, but I would have expected [*gen] to have triggered an exception before it even got to gather(). The real code was something like: >>> l = (ensure_awaitable(callable_obj) for callable_obj in callable_list) >>> gather(*l)

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-01-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1a8dc350962b by Martin Panter in branch '3.5': Issue #4806: Avoid masking original TypeError in call with * unpacking https://hg.python.org/cpython/rev/1a8dc350962b New changeset 1261f5f6fc95 by Martin Panter in branch 'default': Issue #4806: Merge

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-01-29 Thread Martin Panter
Martin Panter added the comment: I think this is ready to push for Python 3. Python 2 might need an extra Py_TPFLAGS_HAVE_ITER check, perhaps reusing some code from the Issue 5218 patch. -- stage: patch review -> commit review versions: +Python 3.6 -Python 3.4

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-01-22 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +yselivanov ___ Python tracker ___ ___

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-01-20 Thread Samuel BOVÉE
Samuel BOVÉE added the comment: Up for this bug. I got this bug in my code and loose one hour to understand what happened. Please review Martin's patch ! -- nosy: +Samuel BOVÉE ___ Python tracker

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2015-02-23 Thread Martin Panter
Martin Panter added the comment: I am posting a new version of Daniel’s patch as issue4806-star-TypeError.v2.patch: * Merged with recent “default” (3.5) branch * Dropped the documentation fix, since revision a8aa918041c2 already fixed that in an identical fashion * Changed to a “look before

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2014-03-19 Thread R. David Murray
R. David Murray added the comment: Sounds like we just need someone comfortable with modifying ceval.c to apply this ;) -- nosy: +benjamin.peterson, r.david.murray versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2014-02-18 Thread pfctdayelise
Changes by pfctdayelise brianna.laug...@gmail.com: -- nosy: +pfctdayelise ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806 ___ ___

[issue19810] Display function signature in TypeErrors resulting from argument mismatches

2013-11-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- title: Adding a feature to python interpreter - Display function signature in TypeErrors resulting from argument mismatches type: - enhancement ___ Python tracker rep...@bugs.python.org http

[issue19810] Display function signature in TypeErrors resulting from argument mismatches

2013-11-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: While we don't print the whole signature, this is much improved in 3.3: def foo(a,b=4,c=hello): pass foo() Traceback (most recent call last): File stdin, line 1, in module TypeError: foo() missing 1 required positional argument: 'a' -- nosy:

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-11-28 Thread Chris Kaynor
Changes by Chris Kaynor ckay...@zindagigames.com: -- nosy: +DragonFireCK ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806 ___ ___

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-02-27 Thread Jon Brandvein
Changes by Jon Brandvein jon.brandv...@gmail.com: -- nosy: +brandj ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806 ___ ___ Python-bugs-list

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-02-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: #13904 is another dup, with patches to test and ceval. I asked that they be reloaded to this issue. -- nosy: +ncoghlan versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-02-03 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +ron_adam ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806 ___ ___ Python-bugs-list mailing

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-02-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: #5218 is a 4th duplicate, also with a patch to the ceval loop and test. -- nosy: +georg.brandl, gpolo, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-02-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Sorry Martin, I see you already said that. Anyway, I closed other three in favor of this one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-01-11 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806 ___ ___ Python-bugs-list

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-01-11 Thread Martin Panter
Martin Panter vadmium...@gmail.com added the comment: I haven’t tried to understand what the patches do, but Issue 5218 looks like a very similar problem with a patch including a test case. -- ___ Python tracker rep...@bugs.python.org

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2011-04-29 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: #11944 is probably a duplicate of this and should be checked when this is fixed -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806 ___

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2011-03-06 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806 ___ ___ Python-bugs-list

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2011-03-06 Thread Daniel Urban
Daniel Urban urban.dani...@gmail.com added the comment: I think the patch isn't entirely correct. It uses PyIter_Check for detecting the case when an *iterable* raises TypeError, but that function actually checks for an *iterator*. The check on the tp_iter member mentioned by Amaury Forgeot

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2011-03-06 Thread Daniel Urban
Daniel Urban urban.dani...@gmail.com added the comment: I'm attaching an updated patch. Instead !PyIter_Check() this patch checks for tp_iter == NULL !PySequence_Check. If this condition is false, PyObject_GetIter has a chance to succeed (and if it fails, we shouldn't mask the exception).

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Backported to 3.1 in r88556, and 2.7 in r88564. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___

[issue5285] hmac throws TypeErrors

2011-02-05 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: This damn bug ruined my day. MoinMoin couldn't reset password on many outdated wikies 1.8.2 (including Python's one probably), because of it. http://moinmo.in/MoinMoinBugs/1.8_ResetPasswordError -- nosy: +techtonik

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: georg.brandl (2010-12-03 10:20): Don't worry, it will be ported. When? Why would it *not* be merged to the 2.7 and 3.1 branches at the time the bug is closed? Delaying the port only increases the chance that the fix will fall between the

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Let's reopen until then. -- assignee: pitrou - resolution: fixed - accepted stage: - committed/rejected status: closed - open versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Because I don't think porting every change immediately is worth my time when I can do it much faster in mass-merges. I know other developers do this differently, but since I use svnmerge to do my mass-merges, there won't be any falling through

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-12-03 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: This fix needs backporting to the 3.1 and 2.7 branches as well. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-12-03 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Don't worry, it will be ported. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-12-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I agree; committed in r86960. If anyone wants to change this to raise TypeError for objects that are both unhashable and unrefable, please speak up. -- resolution: - fixed status: open - closed ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I don't have any other insights on this one. Assigned by to Antoine who appears to have put some thought into it. -- assignee: rhettinger - pitrou ___ Python tracker

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well if WeakKeyDictionary silences the TypeError from ref(), it sounds consistent for WeakSet to silence it too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
' to raise a TypeError. Patch forthcoming. -- messages: 120743 nosy: tseaver priority: normal severity: normal status: open title: _weakrefset.WeakSet.__contains__ should not propagate TypeErrors versions: Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- components: +Library (Lib) keywords: +patch Added file: http://bugs.python.org/file19545/issue10360.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: A result from IRC is that to be consistent with normal sets, only TypeErrors coming from ref() should be caught, but not those TypeErrors from the actual membership test (i.e. the hash functioon of the value). -- assignee: - rhettinger

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: Removed file: http://bugs.python.org/file19545/issue10360.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: A new version of the patch, which only traps TypeErrors raises by ref(item). The test now ensures that hashing errors are propagated, for compatibility with standard sets. -- Added file: http://bugs.python.org/file19546/issue10360

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: Removed file: http://bugs.python.org/file19546/issue10360-redux.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: One more time, with feeling. Sorry for the noise, the last patch was not against the 2.7 trunk. -- Added file: http://bugs.python.org/file19547/issue10360-redux.patch ___ Python tracker

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: FTR, the patch applies cleanly to the py3k branch, too. (Michael pointed out that the original code was copied directly from there). -- ___ Python tracker rep...@bugs.python.org

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: What is the behaviour of WeakKeyDictionary here? I don't really agree that TypeError should be silenced. -- nosy: +pitrou versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: WeakKeyDictionary's __contains__: def __contains__(self, key): try: wr = ref(key) except TypeError: return 0 return wr in self.data -- ___

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2010-08-05 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: IIUC, the only change you suggest for my patch is using finite iterable instead of sequence or iterable, right? I've looked at the docs and there seems to be no precedent for finite iterable. I think it's just as obvious that the iterable

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2010-08-05 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Ok, leave iterable as is. More important, you have two disjoint patches that I believe should be combined. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2010-08-05 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: Attaching a combined patch against the current py3k. -- Added file: http://bugs.python.org/file18404/combined.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I verified with 3.1 the two OP cases and that generators work fine as long as they supply the correct number of values. def f(x): return x def broken(): return 1 print(f(*(broken() for x in (0, # prints 1 Change (0,) to (0,1) the normal

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2010-05-03 Thread Bruce Frederiksen
Bruce Frederiksen dangy...@gmail.com added the comment: I have also hit this error. I went to report it but found it already entered (good news), but not resolved from nearly a year ago (bad news). The error masked another bug that I had in my program and it took me quite awhile to figure

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2010-05-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- keywords: +needs review stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806 ___

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2009-06-03 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: I added a simple check for iterables. This is not very elegant, but performance is only affected in the case of an exception. Patch and corresponsing test are attached as TypeError.patch. As I pointed out above, the actual error message

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2009-06-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This patch leaks a reference on each call to PyObject_GetIter(). And I'm not sure it is a good idea to call this function again: it may be very expensive! I'd prefer a simple check on the tp_iter member. --

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2009-06-03 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: Sorry, I had meant to use PyIter_Check instead of PyObject_GetIter. Don't know why I didn't do so... ;-) I corrected the patch. -- Added file: http://bugs.python.org/file14169/TypeError2.patch

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2009-06-03 Thread Hagen Fürstenau
Changes by Hagen Fürstenau hfuerste...@gmx.net: Removed file: http://bugs.python.org/file14166/TypeError.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806 ___

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2009-06-02 Thread Kenneth Arnold
Kenneth Arnold kenneth.arn...@gmail.com added the comment: I can confirm that (a) this exact behavior is happening and (b) it quite confused me (most of the time it works!). What would be a good TypeError? I'd vote for generators to be explicitly supported even if it required a special case.

[issue5285] hmac throws TypeErrors

2009-04-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Python 3 behavior is correct. Since HMAC operates on bytes, not text, only bytes are accepted. In Python 2, the acceptance of Unicode strings is more an accident than a feature. -- nosy: +georg.brandl resolution: - wont fix status: open

Re: TypeErrors

2009-03-01 Thread Benjamin Kaplan
On Sun, Mar 1, 2009 at 1:50 PM, Sean Novick daddysea...@yahoo.com wrote: Here is the bit of code my error was refering to: class phonedb: some definitons... def lookup(self, string): list = [] for key in self.shelve.keys(): e = self.shelve[key] if

Re: TypeErrors

2009-03-01 Thread Christian Heimes
Benjamin Kaplan wrote: cmp(e, string) is actually just a shortcut for e.__cmp__(string). FYI, cmp(e, string) does a lot more than just calling e.__cmp__(string). Check out Objects/object.c:do_cmp() Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeErrors

2009-03-01 Thread Scott David Daniels
Dennis Lee Bieber wrote: ... Even this looks strange, since all list will contain is a copy of string for each occurrence of string in the values of shelve! Furthermore, the only use for the key is to obtain the value -- the key is never returned for later use... so... def lookup(self,

TypeErrors

2009-02-28 Thread Sean Novick
I'm having issues with a phone-number database. Here is a code snippet:  def menu():         print '''Please make a selection from the following options:     To add an Employee - enter: 1         For a complete listing of Employees - enter: 2     To see the 'test page'

Re: TypeErrors

2009-02-28 Thread Benjamin Kaplan
On Sat, Feb 28, 2009 at 12:24 PM, Sean Novick daddysea...@yahoo.com wrote: I'm having issues with a phone-number database. Here is a code snippet: def menu(): print '''Please make a selection from the following options: To add an Employee - enter: 1 For a complete

TypeErrors

2009-02-28 Thread rdmurray
Sean Novick daddysea...@yahoo.com wrote: First lookup: Traceback (most recent call last): File F:\CSC113 Module 4 CA\sample database.py, line 72, in module class phonedb: File F:\CSC113 Module 4 CA\sample database.py, line 146, in phonedb

[issue5285] hmac throws TypeErrors

2009-02-20 Thread victor
Changes by victor pyt...@victorstar.com: -- nosy: +victorstar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5285 ___ ___ Python-bugs-list mailing

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2009-01-03 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: I'm getting confused about whether it's actually desired behaviour that generators can be star arguments. The error message seems to say it's not: argument after * must be a sequence. The docs seem to agree: If the syntax *expression

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2009-01-02 Thread Hagen Fürstenau
taking a generator as star argument can mask TypeErrors in the generator type: behavior versions: Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4806

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2009-01-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The issue1615 has the same kind of problems: an AttributeError is masked by another one. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org