Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #26806 > unrolled thread

save dictionary to a file without brackets.

Started bygiuseppe.amatulli@gmail.com
First post2012-08-09 13:11 -0700
Last post2012-08-10 02:02 +0400
Articles 20 on this page of 55 — 18 participants

Back to article view | Back to comp.lang.python


Contents

  save dictionary to a file without brackets. giuseppe.amatulli@gmail.com - 2012-08-09 13:11 -0700
    Re: save dictionary to a file without brackets. Roman Vashkevich <vashkevichrb@gmail.com> - 2012-08-10 00:22 +0400
    Re: save dictionary to a file without brackets. Tim Chase <python.list@tim.thechases.com> - 2012-08-09 15:35 -0500
    Re: save dictionary to a file without brackets. Giuseppe Amatulli <giuseppe.amatulli@gmail.com> - 2012-08-09 15:35 -0500
    Re: save dictionary to a file without brackets. Gelonida N <gelonida@gmail.com> - 2012-08-09 22:35 +0200
    Re: save dictionary to a file without brackets. Giuseppe Amatulli <giuseppe.amatulli@gmail.com> - 2012-08-09 15:38 -0500
    Re: save dictionary to a file without brackets. Roman Vashkevich <vashkevichrb@gmail.com> - 2012-08-10 00:41 +0400
    Re: save dictionary to a file without brackets. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-09 22:17 +0100
    Re: save dictionary to a file without brackets. Tim Chase <python.list@tim.thechases.com> - 2012-08-09 16:21 -0500
    Re: save dictionary to a file without brackets. Roman Vashkevich <vashkevichrb@gmail.com> - 2012-08-10 01:34 +0400
      Re: save dictionary to a file without brackets. Andrew Cooper <amc96@cam.ac.uk> - 2012-08-09 23:03 +0100
        Re: save dictionary to a file without brackets. Dave Angel <d@davea.name> - 2012-08-09 18:26 -0400
          Re: save dictionary to a file without brackets. Andrew Cooper <amc96@cam.ac.uk> - 2012-08-09 23:54 +0100
            Re: save dictionary to a file without brackets. Roy Smith <roy@panix.com> - 2012-08-09 19:05 -0400
              Re: save dictionary to a file without brackets. Chris Angelico <rosuav@gmail.com> - 2012-08-10 09:14 +1000
                Re: save dictionary to a file without brackets. Roy Smith <roy@panix.com> - 2012-08-09 19:24 -0400
                  Re: save dictionary to a file without brackets. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-10 00:33 +0100
                  Re: save dictionary to a file without brackets. Tim Chase <python.list@tim.thechases.com> - 2012-08-09 19:16 -0500
                    Re: save dictionary to a file without brackets. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-10 08:54 +0000
                      Re: save dictionary to a file without brackets. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-10 10:37 +0100
                        Re: save dictionary to a file without brackets. Roy Smith <roy@panix.com> - 2012-08-10 08:29 -0400
                          Re: save dictionary to a file without brackets. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-10 15:47 +0100
                        Re: save dictionary to a file without brackets. alex23 <wuwei23@gmail.com> - 2012-08-12 17:15 -0700
                          Re: save dictionary to a file without brackets. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-13 08:05 +0000
                            Re: save dictionary to a file without brackets. alex23 <wuwei23@gmail.com> - 2012-08-13 09:16 -0700
                            Re: save dictionary to a file without brackets. rusi <rustompmody@gmail.com> - 2012-08-13 08:55 -0700
                          Re: save dictionary to a file without brackets. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-13 13:37 +0100
                            Re: save dictionary to a file without brackets. alex23 <wuwei23@gmail.com> - 2012-08-13 09:14 -0700
                              Re: save dictionary to a file without brackets. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-13 18:07 +0100
                                Re: save dictionary to a file without brackets. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-14 02:54 +0000
                                  Re: save dictionary to a file without brackets. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-14 12:33 +0100
                                    Re: save dictionary to a file without brackets. Alister <alister.ware@ntlworld.com> - 2012-08-14 15:05 +0000
                                      Re: save dictionary to a file without brackets. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-14 19:15 +0100
                          Re: save dictionary to a file without brackets. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-13 18:43 +0100
                            Re: save dictionary to a file without brackets. alex23 <wuwei23@gmail.com> - 2012-08-13 18:32 -0700
                      Re: save dictionary to a file without brackets. Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-10 12:34 -0400
                  Re: save dictionary to a file without brackets. Dave Angel <d@davea.name> - 2012-08-09 20:27 -0400
                  Re: save dictionary to a file without brackets. Chris Angelico <rosuav@gmail.com> - 2012-08-10 10:31 +1000
            Re: save dictionary to a file without brackets. Dave Angel <d@davea.name> - 2012-08-09 19:38 -0400
        Re: save dictionary to a file without brackets. Tim Chase <python.list@tim.thechases.com> - 2012-08-09 17:39 -0500
        Re: save dictionary to a file without brackets. Chris Kaynor <ckaynor@zindagigames.com> - 2012-08-09 15:37 -0700
        Re: save dictionary to a file without brackets. Chris Angelico <rosuav@gmail.com> - 2012-08-10 08:53 +1000
          Re: save dictionary to a file without brackets. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-11 11:26 +0000
            Re: save dictionary to a file without brackets. 88888 Dihedral <dihedral88888@googlemail.com> - 2012-08-12 04:59 -0700
        Re: save dictionary to a file without brackets. Chris Angelico <rosuav@gmail.com> - 2012-08-10 09:01 +1000
        Re: save dictionary to a file without brackets. Dave Angel <d@davea.name> - 2012-08-09 19:42 -0400
        Re: save dictionary to a file without brackets. 88888 Dihedral <dihedral88888@googlemail.com> - 2012-08-09 22:35 -0700
    Re: save dictionary to a file without brackets. Terry Reedy <tjreedy@udel.edu> - 2012-08-09 17:46 -0400
    Re: save dictionary to a file without brackets. Dave Angel <d@davea.name> - 2012-08-09 17:47 -0400
      Re: save dictionary to a file without brackets. 88888 Dihedral <dihedral88888@googlemail.com> - 2012-08-10 10:46 -0700
      Re: save dictionary to a file without brackets. 88888 Dihedral <dihedral88888@googlemail.com> - 2012-08-10 10:46 -0700
    Re: save dictionary to a file without brackets. Chris Kaynor <ckaynor@zindagigames.com> - 2012-08-09 14:49 -0700
    Re: save dictionary to a file without brackets. Chris Kaynor <ckaynor@zindagigames.com> - 2012-08-09 14:51 -0700
    Re: save dictionary to a file without brackets. Giuseppe Amatulli <giuseppe.amatulli@gmail.com> - 2012-08-09 16:53 -0500
    Re: save dictionary to a file without brackets. Roman Vashkevich <vashkevichrb@gmail.com> - 2012-08-10 02:02 +0400

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#26868

FromRoy Smith <roy@panix.com>
Date2012-08-10 08:29 -0400
Message-ID<roy-27FB0D.08293110082012@news.panix.com>
In reply to#26850
In article <mailman.3147.1344591354.4697.python-list@python.org>,
 Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:

> On 10/08/2012 09:54, Steven D'Aprano wrote:
> > On Thu, 09 Aug 2012 19:16:58 -0500, Tim Chase wrote:
> >
> >> On 08/09/12 18:33, Mark Lawrence wrote:
> >>> On 10/08/2012 00:24, Roy Smith wrote:
> >>>>> ... you mean, Python lets you make a hash of it?
> >>>>
> >>>> Only if you order it with spam, spam, spam, spam, spam, spam, and
> >>>> spam.
> >>>
> >>> Now now gentlemen we're getting slightly off topic here and wouldn't
> >>> want to upset the people who insist on staying on topic.  Or would we?
> >>> :)
> >>
> >> We apologise for the off-topicness in the thread.  Those responsible
> >> have been sacked...
> >
> >
> > Sacked? They were beaten to death with a large halibut!
> >
> >
> 
> Well whatever you do *DON'T* mention Cython. I mentioned it just now but 
> I think I've got away with it.

What if I spell it Kython?

[toc] | [prev] | [next] | [standalone]


#26874

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2012-08-10 15:47 +0100
Message-ID<mailman.3164.1344610084.4697.python-list@python.org>
In reply to#26868
On 10/08/2012 13:29, Roy Smith wrote:
> In article <mailman.3147.1344591354.4697.python-list@python.org>,
>   Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
>
>> On 10/08/2012 09:54, Steven D'Aprano wrote:
>>> On Thu, 09 Aug 2012 19:16:58 -0500, Tim Chase wrote:
>>>
>>>> On 08/09/12 18:33, Mark Lawrence wrote:
>>>>> On 10/08/2012 00:24, Roy Smith wrote:
>>>>>>> ... you mean, Python lets you make a hash of it?
>>>>>>
>>>>>> Only if you order it with spam, spam, spam, spam, spam, spam, and
>>>>>> spam.
>>>>>
>>>>> Now now gentlemen we're getting slightly off topic here and wouldn't
>>>>> want to upset the people who insist on staying on topic.  Or would we?
>>>>> :)
>>>>
>>>> We apologise for the off-topicness in the thread.  Those responsible
>>>> have been sacked...
>>>
>>>
>>> Sacked? They were beaten to death with a large halibut!
>>>
>>>
>>
>> Well whatever you do *DON'T* mention Cython. I mentioned it just now but
>> I think I've got away with it.
>
> What if I spell it Kython?
>

What a silly bunt!!!

-- 
Cheers.

Mark Lawrence.

[toc] | [prev] | [next] | [standalone]


#26961

Fromalex23 <wuwei23@gmail.com>
Date2012-08-12 17:15 -0700
Message-ID<4a233182-7a94-4919-a315-fbabbc3ff5a2@hq10g2000pbc.googlegroups.com>
In reply to#26850
On Aug 10, 7:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
> Well whatever you do *DON'T* mention Cython. I mentioned it just now but
> I think I've got away with it.

While I'm not against threads straying off topic, you're beginning to
come across as a bit of an asshole now.

Just let it go.

[toc] | [prev] | [next] | [standalone]


#26968

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2012-08-13 08:05 +0000
Message-ID<5028b54e$0$29867$c3e8da3$5496439d@news.astraweb.com>
In reply to#26961
On Sun, 12 Aug 2012 17:15:12 -0700, alex23 wrote:

> On Aug 10, 7:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
>> Well whatever you do *DON'T* mention Cython. I mentioned it just now
>> but I think I've got away with it.
> 
> While I'm not against threads straying off topic, you're beginning to
> come across as a bit of an asshole now.
> 
> Just let it go.

Chill out Alex, it's all good. Mark was channelling a famous scene from 
"Fawlty Towers", staring Monty Python's own John Cleese, hence it is on-
topic, for the sillier definitions of on-topic.

After making a German tourist cry with his repeated insensitive comments 
about World War Two, Basil Fawlty (Cleese) -- who is an obnoxious git at 
the best of times but is currently suffering from a concussion -- remarks 
to his staff, "Don't mention the war, I mentioned it once but I think I 
got away with it."

http://www.youtube.com/watch?v=7xnNhzgcWTk



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#26995

Fromalex23 <wuwei23@gmail.com>
Date2012-08-13 09:16 -0700
Message-ID<bb9c1a63-d701-4c3d-9503-8a5b3d19de0d@vz5g2000pbc.googlegroups.com>
In reply to#26968
On Aug 13, 6:05 pm, Steven D'Aprano <steve
+comp.lang.pyt...@pearwood.info> wrote:
> Chill out Alex, it's all good. Mark was channelling a famous scene from
> "Fawlty Towers", staring Monty Python's own John Cleese, hence it is on-
> topic, for the sillier definitions of on-topic.

Thank you, yes, I get that. However, Mark has repeatedly been
directing this dickishness at Stefan Behnel ever since he was asked to
not stray off topic. While Mark doesn't have to listen to anyone else
about his behaviour, he can't expect not to be called a dick when
acting like one.

[toc] | [prev] | [next] | [standalone]


#26997

Fromrusi <rustompmody@gmail.com>
Date2012-08-13 08:55 -0700
Message-ID<b087a78e-82be-4a9e-9a6b-7ca3803ef25a@td3g2000pbc.googlegroups.com>
In reply to#26968
On Aug 13, 1:05 pm, Steven D'Aprano <steve
+comp.lang.pyt...@pearwood.info> wrote:
>
> Chill out Alex, it's all good. Mark was channelling a famous scene from
> "Fawlty Towers", staring Monty Python's own John Cleese, hence it is on-
> topic, for the sillier definitions of on-topic.

Ha! Thanks for that connection.
Watched and enjoyed Fawlty towers as a kid but have never seen a Monty
Python.

[toc] | [prev] | [next] | [standalone]


#26986

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2012-08-13 13:37 +0100
Message-ID<mailman.3226.1344861423.4697.python-list@python.org>
In reply to#26961
On 13/08/2012 01:15, alex23 wrote:
> On Aug 10, 7:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
>> Well whatever you do *DON'T* mention Cython. I mentioned it just now but
>> I think I've got away with it.
>
> While I'm not against threads straying off topic, you're beginning to
> come across as a bit of an asshole now.
>
> Just let it go.
>

Why on your say so?

-- 
Cheers.

Mark Lawrence.

[toc] | [prev] | [next] | [standalone]


#26994

Fromalex23 <wuwei23@gmail.com>
Date2012-08-13 09:14 -0700
Message-ID<24898464-66a7-4d4d-bbf4-2ebc72fb8749@hq10g2000pbc.googlegroups.com>
In reply to#26986
On Aug 13, 10:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
> Why on your say so?

My mistake, I didn't realise you wanted to sound so tedious. Knock
yourself out.

[toc] | [prev] | [next] | [standalone]


#27000

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2012-08-13 18:07 +0100
Message-ID<mailman.3236.1344877555.4697.python-list@python.org>
In reply to#26994
On 13/08/2012 17:14, alex23 wrote:
> On Aug 13, 10:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
>> Why on your say so?
>
> My mistake, I didn't realise you wanted to sound so tedious. Knock
> yourself out.
>
>

Yes m'lud.  Do I lick your boots or polish them?

-- 
Cheers.

Mark Lawrence.

[toc] | [prev] | [next] | [standalone]


#27011

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2012-08-14 02:54 +0000
Message-ID<5029bdfd$0$29978$c3e8da3$5496439d@news.astraweb.com>
In reply to#27000
On Mon, 13 Aug 2012 18:07:26 +0100, Mark Lawrence wrote:

> On 13/08/2012 17:14, alex23 wrote:
>> On Aug 13, 10:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
>>> Why on your say so?
>>
>> My mistake, I didn't realise you wanted to sound so tedious. Knock
>> yourself out.
>>
>>
>>
> Yes m'lud.  Do I lick your boots or polish them?


Children children, if you won't play nice don't play at all. You're 
scaring away the people who are here to learn about Python.




-- 
Steven

[toc] | [prev] | [next] | [standalone]


#27036

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2012-08-14 12:33 +0100
Message-ID<mailman.3266.1344943930.4697.python-list@python.org>
In reply to#27011
On 14/08/2012 03:54, Steven D'Aprano wrote:
> On Mon, 13 Aug 2012 18:07:26 +0100, Mark Lawrence wrote:
>
>> On 13/08/2012 17:14, alex23 wrote:
>>> On Aug 13, 10:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
>>>> Why on your say so?
>>>
>>> My mistake, I didn't realise you wanted to sound so tedious. Knock
>>> yourself out.
>>>
>>>
>>>
>> Yes m'lud.  Do I lick your boots or polish them?
>
>
> Children children, if you won't play nice don't play at all. You're
> scaring away the people who are here to learn about Python.
>

Steven thanks for your comments, seriously for once, you've helped get 
my feet back on the ground where they belong.

Everybody please accept my apologies for having gone OTT once again :( 
In my defence for mitigating circumstances I offer a combination of 
Asperger Syndrome and a new girl friend.

-- 
Cheers.

Mark Lawrence.

[toc] | [prev] | [next] | [standalone]


#27046

FromAlister <alister.ware@ntlworld.com>
Date2012-08-14 15:05 +0000
Message-ID<KOtWr.876298$Hs3.557200@fx08.am4>
In reply to#27036
On Tue, 14 Aug 2012 12:33:20 +0100, Mark Lawrence wrote:

> On 14/08/2012 03:54, Steven D'Aprano wrote:
>> On Mon, 13 Aug 2012 18:07:26 +0100, Mark Lawrence wrote:
>>
>>> On 13/08/2012 17:14, alex23 wrote:
>>>> On Aug 13, 10:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
>>>>> Why on your say so?
>>>>
>>>> My mistake, I didn't realise you wanted to sound so tedious. Knock
>>>> yourself out.
>>>>
>>>>
>>>>
>>> Yes m'lud.  Do I lick your boots or polish them?
>>
>>
>> Children children, if you won't play nice don't play at all. You're
>> scaring away the people who are here to learn about Python.
>>
>>
> Steven thanks for your comments, seriously for once, you've helped get
> my feet back on the ground where they belong.
> 
> Everybody please accept my apologies for having gone OTT once again :(
> In my defence for mitigating circumstances I offer a combination of
> Asperger Syndrome and a new girl friend.

if you have a new girlfriend why on earth are you posting here, I can 
think of much more interesting things to do.
(apologies for continuing off topic)




-- 
Don't despair; your ideal lover is waiting for you around the corner.

[toc] | [prev] | [next] | [standalone]


#27053

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2012-08-14 19:15 +0100
Message-ID<mailman.3282.1344968034.4697.python-list@python.org>
In reply to#27046
On 14/08/2012 16:05, Alister wrote:
> On Tue, 14 Aug 2012 12:33:20 +0100, Mark Lawrence wrote:
>
>> On 14/08/2012 03:54, Steven D'Aprano wrote:
>>> On Mon, 13 Aug 2012 18:07:26 +0100, Mark Lawrence wrote:
>>>
>>>> On 13/08/2012 17:14, alex23 wrote:
>>>>> On Aug 13, 10:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
>>>>>> Why on your say so?
>>>>>
>>>>> My mistake, I didn't realise you wanted to sound so tedious. Knock
>>>>> yourself out.
>>>>>
>>>>>
>>>>>
>>>> Yes m'lud.  Do I lick your boots or polish them?
>>>
>>>
>>> Children children, if you won't play nice don't play at all. You're
>>> scaring away the people who are here to learn about Python.
>>>
>>>
>> Steven thanks for your comments, seriously for once, you've helped get
>> my feet back on the ground where they belong.
>>
>> Everybody please accept my apologies for having gone OTT once again :(
>> In my defence for mitigating circumstances I offer a combination of
>> Asperger Syndrome and a new girl friend.
>
> if you have a new girlfriend why on earth are you posting here, I can
> think of much more interesting things to do.
> (apologies for continuing off topic)
>

Nothing is off topic here and I take your point, why am I posting here, 
I haven't played pat a cake in years :)

-- 
Cheers.

Mark Lawrence.

[toc] | [prev] | [next] | [standalone]


#27001

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2012-08-13 18:43 +0100
Message-ID<mailman.3237.1344879791.4697.python-list@python.org>
In reply to#26961
On 13/08/2012 01:15, alex23 wrote:
> On Aug 10, 7:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
>> Well whatever you do *DON'T* mention Cython. I mentioned it just now but
>> I think I've got away with it.
>
> While I'm not against threads straying off topic, you're beginning to
> come across as a bit of an asshole now.
>
> Just let it go.
>

http://mail.python.org/pipermail/pypy-dev/2012-February/009277.html

-- 
Cheers.

Mark Lawrence.

[toc] | [prev] | [next] | [standalone]


#27010

Fromalex23 <wuwei23@gmail.com>
Date2012-08-13 18:32 -0700
Message-ID<616b2868-f167-44e7-a6f2-d13e65bb2a07@nc9g2000pbc.googlegroups.com>
In reply to#27001
On Aug 14, 3:43 am, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
> On 13/08/2012 01:15, alex23 wrote:
>
> > On Aug 10, 7:37 pm, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
> >> Well whatever you do *DON'T* mention Cython. I mentioned it just now but
> >> I think I've got away with it.
>
> > While I'm not against threads straying off topic, you're beginning to
> > come across as a bit of an asshole now.
>
> > Just let it go.
>
> http://mail.python.org/pipermail/pypy-dev/2012-February/009277.html
>
> --
> Cheers.
>
> Mark Lawrence.

Yeah, you're really coming across as holding the moral high ground
here.

Plonk.

[toc] | [prev] | [next] | [standalone]


#26878

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2012-08-10 12:34 -0400
Message-ID<mailman.3167.1344616453.4697.python-list@python.org>
In reply to#26845
On 10 Aug 2012 08:54:42 GMT, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> declaimed the following in
gmane.comp.python.general:

> On Thu, 09 Aug 2012 19:16:58 -0500, Tim Chase wrote:
> 
> > On 08/09/12 18:33, Mark Lawrence wrote:
> >> On 10/08/2012 00:24, Roy Smith wrote:
> >>>> ... you mean, Python lets you make a hash of it?
> >>>
> >>> Only if you order it with spam, spam, spam, spam, spam, spam, and
> >>> spam.
> >> 
> >> Now now gentlemen we're getting slightly off topic here and wouldn't
> >> want to upset the people who insist on staying on topic.  Or would we?
> >> :)
> > 
> > We apologise for the off-topicness in the thread.  Those responsible
> > have been sacked...
> 
> 
> Sacked? They were beaten to death with a large halibut!

	I think the thread is floundering...
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#26838

FromDave Angel <d@davea.name>
Date2012-08-09 20:27 -0400
Message-ID<mailman.3141.1344558471.4697.python-list@python.org>
In reply to#26833
On 08/09/2012 08:16 PM, Tim Chase wrote:
> On 08/09/12 18:33, Mark Lawrence wrote:
>> On 10/08/2012 00:24, Roy Smith wrote:
>>>> ... you mean, Python lets you make a hash of it?
>>> Only if you order it with spam, spam, spam, spam, spam, spam, and spam.
>> Now now gentlemen we're getting slightly off topic here and wouldn't 
>> want to upset the people who insist on staying on topic.  Or would we? :)
> We apologise for the off-topicness in the thread.  Those responsible
> have been sacked...
>
> -tkc
>
>
>
Paper or plastic?


-- 

DaveA

[toc] | [prev] | [next] | [standalone]


#26839

FromChris Angelico <rosuav@gmail.com>
Date2012-08-10 10:31 +1000
Message-ID<mailman.3142.1344558722.4697.python-list@python.org>
In reply to#26833
On Fri, Aug 10, 2012 at 10:16 AM, Tim Chase
<python.list@tim.thechases.com> wrote:
> We apologise for the off-topicness in the thread.  Those responsible
> have been sacked...

So if you take every mapping variable in your program and name them
"dFoo", "dBar", "dQuux", etc, for "dict"... would that be a dirty
Hungarian dictionary?

Excuse me, I'll go and sack myself now.

ChrisA

[toc] | [prev] | [next] | [standalone]


#26835

FromDave Angel <d@davea.name>
Date2012-08-09 19:38 -0400
Message-ID<mailman.3137.1344555521.4697.python-list@python.org>
In reply to#26829
On 08/09/2012 06:54 PM, Andrew Cooper wrote:
> On 09/08/2012 23:26, Dave Angel wrote:
>> On 08/09/2012 06:03 PM, Andrew Cooper wrote:
>>> On 09/08/2012 22:34, Roman Vashkevich wrote:
>>>> Actually, they are different.
>>>> Put a dict.{iter}items() in an O(k^N) algorithm and make it a hundred thousand entries, and you will feel the difference.
>>>> Dict uses hashing to get a value from the dict and this is why it's O(1).
>>>>
>>> Sligtly off topic, but looking up a value in a dictionary is actually
>>> O(n) for all other entries in the dict which suffer a hash collision
>>> with the searched entry.
>>>
>>> True, a sensible choice of hash function will reduce n to 1 in common
>>> cases, but it becomes an important consideration for larger datasets.
>>>
>>> ~Andrew
>> I'm glad you're wrong for CPython's dictionaries.  The only time the
>> lookup would degenerate to O[n] would be if the hash table had only one
>> slot.  CPython sensibly increases the hash table size when it becomes
>> too small for efficiency.
>>
>>
>> Where have you seen dictionaries so poorly implemented?
>>
> Different n, which I should have made more clear.  I was using it for
> consistency with O() notation.  My statement was O(n) where n is the
> number of hash collisions.
That's a little like doing a survey, and reporting the results as
showing that 100% of the women hit their husbands, among the population
of women who hit their husbands.

In your original message, you already stated the assumption that a
proper hash algorithm would be chosen, then went on to apparently claim
that large datasets would still have an order n problem.  That last is
what I was challenging.

The rest of your message here refers to client code, not the system.
> The choice of hash algorithm (or several depending on the
> implementation) should specifically be chosen to reduce collisions to
> aid in efficient space utilisation and lookup times, but any
> implementation must allow for collisions.  There are certainly runtime
> methods of improving efficiency using amortized operations.
>
> As for poor implementations,
>
> class Foo(object):
>
>     ...
>
>     def __hash__(self):
>         return 0
>
> I seriously found that in some older code I had the misfortune of
> reading.  It didn't remain in that state for long.
>
> ~Andrew


-- 

DaveA

[toc] | [prev] | [next] | [standalone]


#26826

FromTim Chase <python.list@tim.thechases.com>
Date2012-08-09 17:39 -0500
Message-ID<mailman.3130.1344551893.4697.python-list@python.org>
In reply to#26824
On 08/09/12 17:26, Dave Angel wrote:
> On 08/09/2012 06:03 PM, Andrew Cooper wrote:
> I'm glad you're wrong for CPython's dictionaries.  The only time the
> lookup would degenerate to O[n] would be if the hash table had only one
> slot.  CPython sensibly increases the hash table size when it becomes
> too small for efficiency.
> 
> Where have you seen dictionaries so poorly implemented?

PHP?

http://www.phpclasses.org/blog/post/171-PHP-Vulnerability-May-Halt-Millions-of-Servers.html

-tkc



[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | comp.lang.python


csiph-web