4 ms·
Thanks. Not sure if it is useful for me as I still have to use python 2.7 UPDATE: I didn't see the python stubs, that made my day! lot of thanks for it!
by jorgemf 9y ago
Thanks. Not sure if it is useful for me as I still have to use python 2.7
UPDATE: I didn't see the python stubs, that made my day! lot of thanks for it!
- mnarayan01 9y agoYea I'm in the same boat. It's nice, though there are definitely warts. For third-party stuff stubs are a big help. For stuff I'm actively working on I've found comments/docstrings (I've used reStructuredText) to be useful: self.ivar = 1 # type: int self.ivar = [1] """ :type: list[int] """ def fun(arg1, arg2): # type: (int, str) -> str def fun(arg): """ :param int or str arg: :rtype: str or None """ I like the comment version (e.g. `# type: int`) better (plus its officially defined in PEP 484), but sadly they tend not to work as well, sometimes due to not being able to `import typing`, and sometimes for other less clear reasons.