Menu

#4 'String' does not work properly

open
nobody
None
5
2008-12-31
2008-12-31
No

Hello,
I'm using typecheck 0.3.5
Python 2.5
Linux Ubuntu 8.04.1
And I have the same problem than tiagocoutinho _and_ another one with String:

@accepts(String)
def f(a):
print a

if __name__ == "__main__":
f(2)

The exception is not the one expected:
typecheck.TypeCheckError: Argument a: for 2, missing attribute upper

I would have expected something like:
typecheck.TypeCheckError: Argument a: for 2, expected <type 'String'>, got <type 'int'>

Sincerely,
Marc.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB