[ python-Bugs-1697248 ] Property with -> annotation triggers assert
SourceForge.net
noreply at sourceforge.net
Mon Apr 23 13:06:25 CEST 2007
Bugs item #1697248, was opened at 2007-04-10 09:05
Message generated for change (Comment added) made by ncoghlan
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1697248&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 3000
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Nobody/Anonymous (nobody)
Summary: Property with -> annotation triggers assert
Initial Comment:
Example:
# x.py
class C:
@property
def p(self) -> int:
return 0
$ ./python -E x.py
python: ../Python/ast.c:724: ast_for_arguments: Assertion `((n)->n_type) == 263 || ((n)->n_type) == 267' failed.
Aborted
$
Removing "@property" or "-> int" from the example avoids the problem. Adding argument annotations inside the argument list doesn't trigger it.
----------------------------------------------------------------------
>Comment By: Nick Coghlan (ncoghlan)
Date: 2007-04-23 21:06
Message:
Logged In: YES
user_id=1038590
Originator: NO
Fixed in rev 54926 (the check for whether or not decorators were present
wasn't quite right).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1697248&group_id=5470
More information about the Python-bugs-list
mailing list