Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #13031

Re: TypeError: object.__init__() takes no parameters

From Terry Reedy <tjreedy@udel.edu>
Subject Re: TypeError: object.__init__() takes no parameters
Date 2011-09-09 13:31 -0400
References <e4d24c0f-3556-420d-bfed-4b14927d35a4@v16g2000prb.googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.909.1315589550.27778.python-list@python.org> (permalink)

Show all headers | View raw


On 9/9/2011 1:47 AM, Oliver wrote:

> If I want to run shapes.py I receive this error message:

Others have explained why code that ran once now does not.

> class Container(object):
>      """Container to store  a number of non-overlapping rectangles."""
>      def __init__(self, xsize=1200, ysize=800):
>          super(Container, self).__init__(xsize, ysize)

Remove this line and the error will go away. It *never* did anything.

>          self.rect = Rectangle(0, 0, xsize, ysize)
>          self.boxes = []
>          self.last_placement_strategy = 0

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

TypeError: object.__init__() takes no parameters Oliver <wildeskraut@googlemail.com> - 2011-09-08 22:47 -0700
  Re: TypeError: object.__init__() takes no parameters Ben Finney <ben+python@benfinney.id.au> - 2011-09-09 16:44 +1000
  Re: TypeError: object.__init__() takes no parameters Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-09-09 08:57 +0200
    Re: TypeError: object.__init__() takes no parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-09-09 18:33 +1000
      Re: TypeError: object.__init__() takes no parameters Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-09-09 11:11 +0200
      Re: TypeError: object.__init__() takes no parameters Duncan Booth <duncan.booth@invalid.invalid> - 2011-09-09 13:20 +0000
        Re: TypeError: object.__init__() takes no parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-09-09 23:41 +1000
    Re: TypeError: object.__init__() takes no parameters Duncan Booth <duncan.booth@invalid.invalid> - 2011-09-09 09:49 +0000
  Re: TypeError: object.__init__() takes no parameters Terry Reedy <tjreedy@udel.edu> - 2011-09-09 13:31 -0400

csiph-web