[docs] [issue16607] Bad examples in documentation

myreallycoolname report at bugs.python.org
Tue Dec 4 22:17:00 CET 2012


myreallycoolname added the comment:

I'm no expert so I'm not sure which it is but try these:

>>> class Complex:
...     def __init__(self, realpart, imagpart):
...         self.r = realpart
...         self.i = imagpart
...

class Bag:
    def __init__(self):
        self.data = []
    def add(self, x):
        self.data.append(x)
    def addtwice(self, x):
        self.add(x)
        self.add(x)

If that's not it wait and I'll submit a new and better bug report or add to the existing one.

> ----- Original Message -----
> From: myreallycoolname
> Sent: 12/04/12 04:12 PM
> To: doark at mail.com
> Subject: [issue16607] Bad examples in documentation
> 
> myreallycoolname added the comment:
> 
> Sorry about that. You will unfortunatly have to wait as I'm not on a computer that has python installed currently.
> 
> > ----- Original Message -----
> > From: Daniel Urban
> > Sent: 12/04/12 02:00 PM
> > To: doark at mail.com
> > Subject: [issue16607] Bad examples in documentation
> > 
> > Daniel Urban added the comment:
> > 
> > Could you please point to a specific example which is incorrect? Thank you.
> > 
> > ----------
> > nosy: +daniel.urban
> > 
> > _______________________________________
> > Python tracker <report at bugs.python.org>
> > <http://bugs.python.org/issue16607>
> > _______________________________________
> >
> 
> ----------
> 
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue16607>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16607>
_______________________________________


More information about the docs mailing list