necaris / cuid.py

A fast, scalable unique ID generator for Python
BSD 2-Clause "Simplified" License
64 stars 8 forks source link

Document parameter and return types #5

Closed scop closed 7 years ago

necaris commented 7 years ago

@scop Can you please add a note to the :rtype: str lines to emphasize that this is str in Py2 and Py3 and not unicode in Py2?

scop commented 7 years ago

The reason I added this info to the docstrings is to assist tools such as PyDev in knowing what types to expect, especially for return values, and help them offer useful completions. If there is a way to add the kind of additional info you requested without breaking my goal, no objections, but I'm not aware of how to do it.

And besides, if it's a str in py2 and py3, it's a str, period! No further explanation needed :)

necaris commented 7 years ago

@scop that's fair. I'll go ahead and merge and if I can find a better way to spell the distinction I'll add it.