Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #99763
| Path | csiph.com!au2pb.net!feeder.erje.net!2.eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Question about code writing '% i, callback' |
| Date | Mon, 30 Nov 2015 20:44:09 -0500 |
| Organization | IISS Elusive Unicorn |
| Lines | 25 |
| Message-ID | <mailman.50.1448934253.14615.python-list@python.org> (permalink) |
| References | <25af8ac3-5fc7-44bd-a73f-7a870b69515a@googlegroups.com> <mailman.41.1448902962.14615.python-list@python.org> <53ef7ef4-cfec-4c91-a45c-5b847dde8fad@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de ldpzjz+pqeCYhPPWpSNB7wYFFndlidrc2MBS1Kp1wOTg== |
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:Question': 0.05; 'subject:code': 0.07; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'callback)': 0.16; 'ian.': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:writing': 0.16; 'url:home': 0.18; '2015': 0.20; '%s"': 0.22; 'fit': 0.23; 'mon,': 0.24; 'example': 0.26; 'header:X -Complaints-To:1': 0.26; 'class.': 0.30; 'another': 0.32; 'class': 0.33; 'case,': 0.34; 'instance': 0.35; 'nov': 0.35; 'item': 0.35; 'there': 0.36; 'created': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'method': 0.37; 'received:org': 0.37; 'charset :us-ascii': 0.37; 'whatever': 0.39; 'does': 0.39; 'to:addr:python.org': 0.40; 'skip:u 10': 0.61; 'dennis': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| X-Gmane-NNTP-Posting-Host | adsl-108-79-219-161.dsl.klmzmi.sbcglobal.net |
| X-Newsreader | Forte Agent 6.00/32.1186 |
| X-No-Archive | YES |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:99763 |
Show key headers only | View raw
On Mon, 30 Nov 2015 10:55:23 -0800 (PST), fl <rxjwg98@gmail.com> declaimed
the following:
>Thanks Ian. I created the class because I want to use the original example
>line
>
> UI.Button("button %s" % i, callback)
>
>Is there another way to use the above line without my class definition?
>I do feel that my created class does not match well with the above line
>because the first item "button %s" does not fit __self__ in the class.
The first item passed to a method call is the instance object... In
this case, whatever "UI" is bound to.
If it helps, think of
UI.Button("string", callback)
as
Button(UI, "string", callback)
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Question about code writing '% i, callback' fl <rxjwg98@gmail.com> - 2015-11-30 08:44 -0800
Re: Question about code writing '% i, callback' Zachary Ware <zachary.ware+pylist@gmail.com> - 2015-11-30 10:53 -0600
Re: Question about code writing '% i, callback' Zachary Ware <zachary.ware+pylist@gmail.com> - 2015-11-30 10:54 -0600
Re: Question about code writing '% i, callback' Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-30 11:01 -0600
Re: Question about code writing '% i, callback' fl <rxjwg98@gmail.com> - 2015-11-30 10:55 -0800
Re: Question about code writing '% i, callback' Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-30 20:44 -0500
Re: Question about code writing '% i, callback' Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-01 09:53 -0600
Re: Question about code writing '% i, callback' fl <rxjwg98@gmail.com> - 2015-11-30 09:36 -0800
Re: Question about code writing '% i, callback' Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-30 11:24 -0700
Re: Question about code writing '% i, callback' Terry Reedy <tjreedy@udel.edu> - 2015-11-30 12:36 -0500
Re: Question about code writing '% i, callback' fl <rxjwg98@gmail.com> - 2015-11-30 09:50 -0800
csiph-web