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


Groups > comp.lang.python > #50265

Re: Help with 'self' and 'set_usage'

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <antoon.pardon@rece.vub.ac.be>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.044
X-Spam-Evidence '*H*': 0.92; '*S*': 0.01; 'scripts': 0.03; "subject:' ": 0.07; 'variables': 0.07; 'subject:Help': 0.11; 'python': 0.11; 'def': 0.12; 'defined.': 0.16; 'language': 0.16; 'all,': 0.19; 'bit': 0.19; 'written': 0.21; 'this?': 0.23; 'header:User- Agent:1': 0.23; "i've": 0.25; 'mention': 0.26; 'header:In-Reply- To:1': 0.27; "i'm": 0.30; 'code': 0.31; 'extending': 0.31; 'anyone': 0.31; 'could': 0.34; 'subject:with': 0.35; "can't": 0.35; 'anywhere': 0.35; 'but': 0.35; 'there': 0.35; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'yes': 0.68; 'pardon': 0.84; 'received:195.238': 0.84; 'received:195.238.6': 0.84; 'received:195.238.6.173': 0.84; 'received:belgacom.be': 0.84; 'received:isp.belgacom.be': 0.84; 'received:mailrelay007.isp.belgacom.be': 0.84; 'subject:self': 0.84
X-Belgacom-Dynamic yes
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result AtEDAMpG3FFbtr6f/2dsb2JhbAANTYM7gw6+SgQBAwGBL4MYAQEEOEARCyEWDwkDAgECAUUTCAKwMIociAaPDGYWg1wDl1OBKYh3ijs
Date Tue, 09 Jul 2013 19:24:54 +0200
From Antoon Pardon <antoon.pardon@rece.vub.ac.be>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130116 Icedove/10.0.12
MIME-Version 1.0
To python-list@python.org
Subject Re: Help with 'self' and 'set_usage'
References <de7c4d2c-817e-4237-b312-0795c1c43888@googlegroups.com>
In-Reply-To <de7c4d2c-817e-4237-b312-0795c1c43888@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4464.1373390763.3114.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1373390763 news.xs4all.nl 15944 [2001:888:2000:d::a6]:35581
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:50265

Show key headers only | View raw


Op 09-07-13 19:03, L O'Shea schreef:
> Hi all,
> I'm interning and have been given the job of extending a program that
> has been written by someone else. I've never used Python before so it's
> a bit of a struggle but I've got to say I'm loving the language so far.
>
> In on of the scripts there is
>
> def set_usage(self,s):
>     self.usage_str = s
>
> Could anyone shed some light on this? I can't find mention of this
> anywhere in any Python documentation or anywhere else in the code
> where usage_str might be defined. Can you just create variables in
> that object by writing self.name = "david" self.hobby = "fishing"??

Yes you can.

-- 
Antoon Pardon

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


Thread

Help with 'self' and 'set_usage' "L O'Shea" <lo0446@my.bristol.ac.uk> - 2013-07-09 10:03 -0700
  Re: Help with 'self' and 'set_usage' Ethan Furman <ethan@stoneleaf.us> - 2013-07-09 10:19 -0700
  Re: Help with 'self' and 'set_usage' Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-07-09 19:24 +0200
  Re: Help with 'self' and 'set_usage' Andrew Berg <robotsondrugs@gmail.com> - 2013-07-09 12:32 -0500
  Re: Help with 'self' and 'set_usage' "L O'Shea" <lo0446@my.bristol.ac.uk> - 2013-07-10 01:23 -0700

csiph-web