6 Answered Questions for the topic Types
What is the Objective-C way of getting a nullable bool?
How should I go about getting a bool value that I can assign true, false and nil to in Objective-C? What is the Objective-C way of doing this? Much like C#'s Nullable<bool>. I'm looking to... more
What are the differences between type() and isinstance()?
What are the differences between these two code fragments?Using `type()`: import types if type(a) is types.DictType: do_something() if type(b) in types.StringTypes: ... more
How to determine a Python variable's type?
How do I see the type of a variable whether it is unsigned 32 bit, signed 16 bit, etc.?How do I view it?
What's the canonical way to check for type in Python?
What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?Let's say I have an object `o`. How do I check whether it's... more