[Python-Dev] unscriptable? (original) (raw)
Georg Brandl g.brandl at gmx.net
Mon Apr 21 19:27:27 CEST 2008
- Previous message: [Python-Dev] unscriptable?
- Next message: [Python-Dev] Is Py_WIN_WIDE_FILENAMES still alive?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alexander Belopolsky schrieb:
ruby: undefined method `[]=' for 1:Fixnum (NoMethodError) I think it will be natural to unify [] error message with the other binary ops: Now:
1+"" Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for +: 'int' and 'str' Proposal: 1[2] Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for []: 'int' and 'int'
This is misleading, since it suggests that you can remedy this by using another type in the subscript, which isn't possible.
Georg
- Previous message: [Python-Dev] unscriptable?
- Next message: [Python-Dev] Is Py_WIN_WIDE_FILENAMES still alive?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]