Subscriptable union for type annotations?

后端 未结 0 1214
野性不改
野性不改 2020-12-04 01:05

I am trying to use type hints to say an object can be of type str or bytes. Then from my understanding, it seems reasonable to alias Union[str, bytes]. However,

相关标签:
回答
  • 消灭零回复
提交回复
热议问题