About 50 results
Open links in new tab
  1. oop - What is an Object in Python? - Stack Overflow

    May 26, 2019 · In the context of Python and all other Object Oriented Programming (OOP) languages, objects have two main characteristics: state and behavior. You can think of a constructor as a factory …

  2. How do I look inside a Python object? - Stack Overflow

    Jun 17, 2009 · I'm starting to code in various projects using Python (including Django web development and Panda3D game development). To help me understand what's going on, I would like to basically …

  3. python - Is there a built-in function to print all the current ...

    Is there a built-in function to print all the current properties and values of an object? No. The most upvoted answer excludes some kinds of attributes, and the accepted answer shows how to get all …

  4. Finding what methods a Python object has - Stack Overflow

    Aug 29, 2008 · Given a Python object of any kind, is there an easy way to get the list of all methods that this object has? Or if this is not possible, is there at least an easy way to check if it has a particular

  5. Get all object attributes in Python? - Stack Overflow

    Get all object attributes in Python? [duplicate] Asked 14 years, 6 months ago Modified 4 years, 9 months ago Viewed 1.0m times

  6. What's the canonical way to check for type in Python?

    Aug 3, 2014 · In Python, you can use the built-in isinstance() function to check if an object is of a given type, or if it inherits from a given type. To check if the object o is of type str, you would use the …

  7. python - Determine the type of an object? - Stack Overflow

    2398 There are two built-in functions that help you identify the type of an object. You can use type() if you need the exact type of an object, and isinstance() to check an object’s type against something. …

  8. python - 'str' object does not support item assignment - Stack Overflow

    I would like to read some characters from a string s1 and put it into another string s2. However, assigning to s2[j] gives an error: s2[j] = s1[i] # TypeError: 'str' object does not support item

  9. How do I determine the size of an object in Python?

    The question asks how to do it in python, not just finding memory usage of python objects, and using a Mac's activity monitor or any other similar software isn't programmatically using python.

  10. How to convert a nested Python dict to object? - Stack Overflow

    Object-like because of the duck typing principle. What I mean is you can access its properties like you would if it was an instance of a class. but it's NOT an object in that sense, it's a named tuple.