RE: hash() yields different results for different platforms
The hash is not expected to be unique, it just provides a starting point for another search (usually linear ?). See http://en.wikipedia.org/wiki/Hash_function Helpfully, Maybe, Richard. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Piet van Oostrum Sent: 12 July 2006 10:56 To: python-list@python.org Subject: Re: hash() yields different results for different platforms > Grant Edwards <[EMAIL PROTECTED]> (GE) wrote: >GE> The low 32 bits match, so perhaps you should just use that >GE> portion of the returned hash? If the hashed should be unique, 32 bits is much too low if you have millions of entries. -- Piet van Oostrum <[EMAIL PROTECTED]> URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
RE: Full splitting of a file's pathname
Unless it's the sort of operating system that uses something like : Sys$disk:[foo.bar.moo.lar]myfile.txt (VaxVMS, from quite a few years ago) And if I recall, the parsing function provided would also separate the extension from the main part of the file's name. Unhelpfully, Richard. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of BartlebyScrivener Sent: 10 July 2006 15:52 To: python-list@python.org Subject: Re: Full splitting of a file's pathname I don't know if it's "standard," but why not just: dir = './foo/bar/moo/lar/myfile.txt' dir.split('/') ['.', 'foo', 'bar', 'moo', 'lar', 'myfile.txt'] rd -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
RE: Illegal instruction or undefined symbol from import
The only use I now for them is when you need to plot the sine of a sine. Or possibly to calculate the frequency spectrum of this. Ie x = a.sin( b.sin( y ) ) This is fundamental to Frequency Modulation. I don't know if they apply anywhere else ? Unhelpfully, Richard. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nick Maclaren Sent: 05 July 2006 11:32 To: python-list@python.org Subject: Re: Illegal instruction or undefined symbol from import In article <[EMAIL PROTECTED]>, Mathias Waack <[EMAIL PROTECTED]> writes: |> |> > There's |> > a lot of somewhat obscure mathematical stuff that got into the standard |> > C lib. How often do you need Bessel functions? |> |> Maybe each day. What is a Bessel function?;) Some people use them all the time; there are specific physical problems where they are fundamental. I have never used them, in 40 years of wide-ranging experience in the scientific computing arena! Regards, Nick Maclaren. -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list