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


Groups > comp.lang.python > #107846 > unrolled thread

def __init__(self,cls):

Started bySan <santanu01@gmail.com>
First post2016-04-29 02:47 -0700
Last post2016-04-30 10:35 +1000
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  def __init__(self,cls): San <santanu01@gmail.com> - 2016-04-29 02:47 -0700
    Re: def __init__(self,cls): Michiel Overtoom <motoom@xs4all.nl> - 2016-04-29 14:29 +0200
    Re: def __init__(self,cls): Steven D'Aprano <steve@pearwood.info> - 2016-04-30 10:35 +1000

#107846 — def __init__(self,cls):

FromSan <santanu01@gmail.com>
Date2016-04-29 02:47 -0700
Subjectdef __init__(self,cls):
Message-ID<70f3b5f6-33b7-4dc8-9c30-92fcc1b1f223@googlegroups.com>
Dear Group,

Please explain the following in details.

"
def __init__(self,cls):
        self.cls = cls
"

Thanks in Advance.
San

[toc] | [next] | [standalone]


#107853

FromMichiel Overtoom <motoom@xs4all.nl>
Date2016-04-29 14:29 +0200
Message-ID<mailman.221.1461933025.32212.python-list@python.org>
In reply to#107846
> On 2016-04-29, at 11:47, San <santanu01@gmail.com> wrote:
> 
> Dear Group, please explain the following in details. Thanks in Advance.
> 
> def __init__(self,cls):
>        self.cls = cls

Is this homework? Why don't you explain it first in your own words, then let us comment on it?

Greetings,


[toc] | [prev] | [next] | [standalone]


#107874

FromSteven D'Aprano <steve@pearwood.info>
Date2016-04-30 10:35 +1000
Message-ID<5723fdf0$0$1598$c3e8da3$5496439d@news.astraweb.com>
In reply to#107846
On Fri, 29 Apr 2016 07:47 pm, San wrote:

> Dear Group,
> 
> Please explain the following in details.
> 
> "
> def __init__(self,cls):
>         self.cls = cls


The answer is the same as the answer you were given when you asked this
question on the tutor mailing list. Did you read the answers you were given
there?

Your question:

https://mail.python.org/pipermail/tutor/2016-April/108689.html


My answer then:

https://mail.python.org/pipermail/tutor/2016-April/108707.html


The difference here is that you take a single argument called "cls".



-- 
Steven

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web