Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5976
| References | <9f91909a-ce08-47dd-81d3-e7cf2edad3b6@h12g2000pro.googlegroups.com> <ir7shb$dd8$1@solani.org> <fe3b6da7-4e9a-4226-bc6e-a271714c2df8@e17g2000prj.googlegroups.com> <5a309bd1-71e1-4c78-a304-24552b1c5da5@m40g2000vbt.googlegroups.com> |
|---|---|
| Date | 2011-05-23 00:25 +1000 |
| Subject | Re: TK program problem |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1915.1306074309.9059.python-list@python.org> (permalink) |
On Mon, May 23, 2011 at 12:03 AM, rantingrick <rantingrick@gmail.com> wrote: > ... was about as effective as the "orb of confusion" on Patrick... > *drool* > That sounds like a Dungeons and Dragons artifact item... invoking the orb of confusion is a standard action that does not provoke an Attack of Opportunity. > class MyDialog(blah): > blah,blah,blah > > def show_dialog(*args): > d = MyDialog(*args) > return d.result > > result = show_dialog() I don't really see why it shouldn't be valid to use the class itself in this way. Once the constructor returns, the object IS the return value. But then, my opinion may not be valid. I've done weird things in C++ where, for instance, the invocation of a modeless dialog is: new FoobarDialog(params); And somewhere it has an event (eg when the window is destroyed) that executes: delete this; I'm a little mad and generally silly, so my opinion doesn't matter (matter matter matter matter). But it did work, and the code was nice and clean! Chris Angelico
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 11:03 -0700
Re: TK program problem Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-20 13:20 -0600
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 15:12 -0700
Re: TK program problem Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-20 16:33 -0600
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 16:07 -0700
Re: TK program problem Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-20 17:29 -0600
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 16:34 -0700
Re: TK program problem rantingrick <rantingrick@gmail.com> - 2011-05-20 16:37 -0700
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-21 17:07 -0700
Re: TK program problem Peter Otten <__peter__@web.de> - 2011-05-21 10:18 +0200
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-21 17:03 -0700
Re: TK program problem Terry Reedy <tjreedy@udel.edu> - 2011-05-21 20:33 -0400
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-21 19:20 -0700
Re: TK program problem Terry Reedy <tjreedy@udel.edu> - 2011-05-22 17:17 -0400
Re: TK program problem rantingrick <rantingrick@gmail.com> - 2011-05-22 07:03 -0700
Re: TK program problem Chris Angelico <rosuav@gmail.com> - 2011-05-23 00:25 +1000
csiph-web