I love assert
ethan at stoneleaf.us
Wed Nov 12 00:38:00 CET 2014
On 11/11/2014 03:02 PM, Peter Cacioppi wrote:
> On Tue, Nov 11, 2014 at 12:57 PM, TP wrote:
>> PyCharm uses docstrings to accomplish the same task  but can also use asserts/isinstance .
>>  https://www.jetbrains.com/pycharm/webhelp/type-hinting-in-pycharm.html
> I use PyCharm. Thanks for , it's a keeper
Please, please don't use isinstance when you don't need to. It just makes your code unusable to anybody who wants/needs
to use a different-yet-compatible type than the one you checked for.
More information about the Python-list