psycopg / psycopg2

PostgreSQL database adapter for the Python programming language
https://www.psycopg.org/
Other
3.35k stars 506 forks source link

Document bytes as another valid input type for lobject.write() #1668

Closed nickzandbergen closed 8 months ago

nickzandbergen commented 8 months ago

I'm not sure what the correct syntax should be, since 3.9 uses Union[t1, t2] for representing multiple types.

dvarrazzo commented 8 months ago

That documentation predates the Python types annotation, so it most places it would be informal (e.g. write(str or bytes)). What you propose is well understandable, it would be ok for me to use.

nickzandbergen commented 8 months ago

Thanks for letting me know, I'll mark this as ready for review as-is then.

dvarrazzo commented 8 months ago

Thank you very much!