Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#569 Use asserts for type inference

closed-duplicate
nobody
None
5
2012-03-06
2012-03-06
Eike Welk
No

In my code there are many lines that check the type of a certain variable
(usually a function argument). Use code like the following to infer the type of
a variable:

assert isinstance(my_var, MyClass)

Discussion

  • Eike Welk
    Eike Welk
    2012-03-06

    • status: open --> closed-duplicate