Aug-18-2021, 02:53 AM
in a function i am planning, one of the arguments is a type choice. i have used string names in the past such as
'str'
or 'bytes'
. i am thinking it would be simpler to just use the type's own class object as a reference, such as just str
or bytes
. what implications or issues might i run into by doing this? the function will never call the function passed to it. it will only compare references like if foo is str:
or if foo in (bytes,bytearray):
.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.