About 72,000 results
Open links in new tab
  1. Python, creating objects - Stack Overflow

    Feb 26, 2013 · Python, creating objects. Ask Question Asked 12 years, 1 month ago. Modified 6 years, 9 months ago. Viewed ...

  2. Python- creating object instances in a loop with independent …

    May 24, 2015 · Python creating multiple instances for a single object/class. 4. Creating instances in a loop with ...

  3. Python - neat way of creating multiple objects? - Stack Overflow

    Apr 12, 2012 · If you have objects with the names object_1, object_2 etc. and want to perform common operations on all these objects, this is a clear sign that you should actually be using a …

  4. Create an Array of objects in Python - Stack Overflow

    Feb 1, 2015 · I'm trying to make a list of objects in python. I'm doing this by making one object. You simply can't do this; your second statement contradicts your first statement. You must …

  5. How to create multiple class objects with a loop in python?

    Creating a dictionary as it has mentioned, but in this case each key has the name of the object name that you want to create. Then the value is set as the class you want to instantiate, see …

  6. How to create a new unknown or dynamic/expando object in Python

    Dec 24, 2012 · However, in stdlib of both Python 2 and Python 3 there's argparse.Namespace, which has the same purpose: Simple object for storing attributes. Implements equality by …

  7. python - How can I create an object and add attributes to it?

    May 13, 2010 · There is types.SimpleNamespace class in Python 3.3+: obj = someobject obj.a = SimpleNamespace() for p in params: setattr(obj.a, p, value) # obj.a.attr1 …

  8. Python - How to create many objects at once? - Stack Overflow

    Aug 16, 2014 · There is an existing list of N objects that contain some data, that by creating an BLL object for each existing objects, is parsed to JSON and returned. Random access is not …

  9. How to speed up python instance initialization for millions of …

    It is applicable in the case when instances of classes are created that de facto do not participate in reference cycles. This is the case for simple record-like objects. It allows to reduce memory …

  10. python - How to create inline objects with properties ... - Stack …

    It is easy in Python to declare a class with an __init__() function that can set up the instance for you, with optional arguments. If you don't specify the arguments you get a blank instance, and …

Refresh