Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 3
    You're not using using super the right way. super is used to call a method of a superclass. Maybe here you just want to create a new instance of a lens if it is None ? In that case you just want to replace the super(Lens).__init__() by self.lens = Lens() Commented Mar 11, 2016 at 10:07
  • 1
    What you're doing is is that a camera not only has a lens, but camera also is-a lens, now that does not make any sense. Commented Mar 11, 2016 at 10:10
  • @AnttiHaapala when I consider my object as a whole ofcourse this is only an exaple.... Commented Mar 11, 2016 at 10:19
  • @loutre I have alreday written that at the end of my question I don't want to access the properties with Camera.Lens.property for this reason I have written this question... Commented Mar 11, 2016 at 10:20
  • @loutre I can't do that beacuse I would have to put all the paramter again.... Commented Mar 11, 2016 at 10:27