[Python-ideas] generic Ref class

Aaron Brady castironpi at comcast.net
Sat Jan 12 23:43:24 CET 2008


> -----Original Message-----
> From: python-ideas-bounces at python.org [mailto:python-ideas-
> bounces at python.org] On Behalf Of Aahz
> 
> On Sat, Jan 12, 2008, Aaron Brady wrote:
> >
> > For iteration and pass-by-reference semantics:
> >
> > 	class Ref:
> > 		def __init__( self, val):
> > 			self.val= val
> 
> Good addition to the cookbook if it's not already there.  IMO, not
> appropriate for the standard library.

That would be your prerogative.  But ah, cookbook: I like the sound of it.




More information about the Python-ideas mailing list