Re: Java singletonMap in Python

2012-09-24 Thread Mark Lawrence
On 24/09/2012 20:22, Devin Jeanpierre wrote: On Sun, Sep 23, 2012 at 7:14 PM, Mark Lawrence wrote: Purely for fun I've been porting some code to Python and came across the singletonMap[1]. I'm aware that there are loads of recipes on the web for both singletons e.g.[2] and immutable dictionari

Re: Java singletonMap in Python

2012-09-24 Thread Mark Lawrence
On 24/09/2012 18:33, Duncan Booth wrote: Steven D'Aprano wrote: On Mon, 24 Sep 2012 00:14:23 +0100, Mark Lawrence wrote: Purely for fun I've been porting some code to Python and came across the singletonMap[1]. I'm aware that there are loads of recipes on the web for both singletons e.g.[2]

Re: Java singletonMap in Python

2012-09-24 Thread Devin Jeanpierre
On Sun, Sep 23, 2012 at 7:14 PM, Mark Lawrence wrote: > Purely for fun I've been porting some code to Python and came across the > singletonMap[1]. I'm aware that there are loads of recipes on the web for > both singletons e.g.[2] and immutable dictionaries e.g.[3]. I was wondering > how to comb

Re: Java singletonMap in Python

2012-09-24 Thread 88888 Dihedral
Duncan Booth於 2012年9月25日星期二UTC+8上午1時33分31秒寫道: > Steven D'Aprano wrote: > > > > > On Mon, 24 Sep 2012 00:14:23 +0100, Mark Lawrence wrote: > > > > > >> Purely for fun I've been porting some code to Python and came across > > >> the singletonMap[1]. I'm aware that there are loads of recipes

Re: Java singletonMap in Python

2012-09-24 Thread Duncan Booth
Steven D'Aprano wrote: > On Mon, 24 Sep 2012 00:14:23 +0100, Mark Lawrence wrote: > >> Purely for fun I've been porting some code to Python and came across >> the singletonMap[1]. I'm aware that there are loads of recipes on >> the web for both singletons e.g.[2] and immutable dictionaries >> e

Re: Java singletonMap in Python

2012-09-23 Thread Steven D'Aprano
On Mon, 24 Sep 2012 00:14:23 +0100, Mark Lawrence wrote: > Purely for fun I've been porting some code to Python and came across the > singletonMap[1]. I'm aware that there are loads of recipes on the web > for both singletons e.g.[2] and immutable dictionaries e.g.[3]. I was > wondering how to c

Re: Java singletonMap in Python

2012-09-23 Thread Oscar Benjamin
On 24 September 2012 00:14, Mark Lawrence wrote: > Purely for fun I've been porting some code to Python and came across the > singletonMap[1]. I'm aware that there are loads of recipes on the web for > both singletons e.g.[2] and immutable dictionaries e.g.[3]. I was > wondering how to combine