Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10932
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit3.readnews.com!panix!gordon |
|---|---|
| From | John Gordon <gordon@panix.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Replace all references to one object with references to other |
| Date | Fri, 5 Aug 2011 20:54:20 +0000 (UTC) |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Lines | 21 |
| Message-ID | <j1hl9s$cgr$1@reader1.panix.com> (permalink) |
| References | <mailman.1937.1312573077.1164.python-list@python.org> <j1hl5v$9gj$1@reader1.panix.com> |
| NNTP-Posting-Host | panix3.panix.com |
| X-Trace | reader1.panix.com 1312577660 12827 166.84.1.3 (5 Aug 2011 20:54:20 GMT) |
| X-Complaints-To | abuse@panix.com |
| NNTP-Posting-Date | Fri, 5 Aug 2011 20:54:20 +0000 (UTC) |
| User-Agent | nn/6.7.3 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:10932 |
Show key headers only | View raw
In <j1hl5v$9gj$1@reader1.panix.com> John Gordon <gordon@panix.com> writes:
> In <mailman.1937.1312573077.1164.python-list@python.org> Jack Bates <ms419@freezone.co.uk> writes:
> > I have two objects, and I want to replace all references to the first
> > object - everywhere - with references to the second object. What can I
> > try?
> The simplest answer to your question is to assign object2 to object1
I think I have that backwards, but the intent should be clear:
object1 = object2
# many references to object1 follow, which will now reference object2
--
John Gordon A is for Amy, who fell down the stairs
gordon@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Replace all references to one object with references to other Jack Bates <ms419@freezone.co.uk> - 2011-08-05 12:37 -0700
Re: Replace all references to one object with references to other John Gordon <gordon@panix.com> - 2011-08-05 20:52 +0000
Re: Replace all references to one object with references to other John Gordon <gordon@panix.com> - 2011-08-05 20:54 +0000
Re: Replace all references to one object with references to other Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-06 10:57 +1000
csiph-web