On Mar 10, 6:01 pm, Neil Hodgson
wrote:
> Metalone:
>
> > As it turns out each call is only
> > 646 nanoseconds slower than 'C'.
> > However, that is still 80% of the time to perform a file seek,
> > which I would think is a relatively slow operation compared to just
> > making a system call.
>
>
On Mar 5, 10:53 am, Pete Emerson wrote:
> Thanks for your response, further questions inline.
>
> On Mar 4, 11:07 am, Tim Wintle wrote:
>
> > On Thu, 2010-03-04 at 10:39 -0800, Pete Emerson wrote:
> > > I am looking for advice along the lines of "an easier way to do this"
> > > or "a more python
On Mar 4, 1:39 pm, Pete Emerson wrote:
> I've written my first python program, and would love suggestions for
> improvement.
>
> I'm a perl programmer and used a perl version of this program to guide
> me. So in that sense, the python is "perlesque"
>
> This script parses /etc/hosts for hostnames,
On Feb 24, 8:05 pm, Lawrence D'Oliveiro wrote:
> In message , Wanja Gayk wrote:
>
> > Reference counting is about the worst technique for garbage collection.
>
> It avoids the need for garbage collection.
That's like saying that driving a VW Beetle avoids the need for an
automobile. Reference co
On Feb 23, 8:03 pm, Nobody wrote:
> On Mon, 22 Feb 2010 22:27:54 -0800, sjdevn...@yahoo.com wrote:
> > Basically, multiprocessing is always hard--but it's less hard to start
> > without shared everything. Going with the special case (sharing
> > everything, aka threadi
On Feb 22, 9:24 pm, John Nagle wrote:
> sjdevn...@yahoo.com wrote:
> > On Feb 20, 9:58 pm, John Nagle wrote:
> >> sjdevn...@yahoo.com wrote:
> >>> On Feb 18, 2:58 pm, John Nagle wrote:
> >>>> Multiple processes are not the answer. That means lo
On Feb 22, 9:24 pm, John Nagle wrote:
> sjdevn...@yahoo.com wrote:
> > On Feb 20, 9:58 pm, John Nagle wrote:
> >> sjdevn...@yahoo.com wrote:
> >>> On Feb 18, 2:58 pm, John Nagle wrote:
> >>>> Multiple processes are not the answer. That means lo
On Feb 20, 9:58 pm, John Nagle wrote:
> sjdevn...@yahoo.com wrote:
> > On Feb 18, 2:58 pm, John Nagle wrote:
> >> Multiple processes are not the answer. That means loading multiple
> >> copies of the same code into different areas of memory. The cache
> &g
On Feb 18, 2:58 pm, John Nagle wrote:
> Multiple processes are not the answer. That means loading multiple
> copies of the same code into different areas of memory. The cache
> miss rate goes up accordingly.
A decent OS will use copy-on-write with forked processes, which should
carry throug
On Feb 20, 1:30 am, Lawrence D'Oliveiro wrote:
> In message , Rhodri James wrote:
>
> > In classic Pascal, a procedure was distinct from a function in that it had
> > no return value. The concept doesn't really apply in Python; there are no
> > procedures in that sense, since if a function termin
On Feb 20, 1:28 am, Lawrence D'Oliveiro wrote:
> In message <87eikjcuzk@benfinney.id.au>, Ben Finney wrote:
>
>
>
> > Lawrence D'Oliveiro writes:
>
> >> In message , cjw wrote:
>
> >> > Aren't lambda forms better described as function?
>
> >> Is this a function?
>
> >> lambda : None
>
> >
On Feb 18, 10:58 pm, Paul Rubin wrote:
> Steve Howell writes:
> >> But frankly, although there's no reason that you _have_ to name the
> >> content at each step, I find it a lot more readable if you do:
>
> >> def print_numbers():
> >> tuples = [(n*n, n*n*n) for n in (1,2,3,4,5,6)]
> >> f
On Feb 18, 11:15 am, Steve Howell wrote:
> def print_numbers()
> [1, 2, 3, 4, 5, 6].map { |n|
> [n * n, n * n * n]
> }.reject { |square, cube|
> square == 25 || cube == 64
> }.map { |square, cube|
> cube
> }.each { |n|
>
On Feb 17, 2:35 am, Steven D'Aprano
wrote:
> On Tue, 16 Feb 2010 21:09:27 -0800, John Nagle wrote:
> > Yes, we're now at the point where all the built-in mutable types
> > have "frozen" versions. But we don't have that for objects. It's
> > generally considered a good thing in language desig
On Feb 9, 3:54 am, George Sakkis wrote:
> I was talking to a colleague about one rather unexpected/undesired
> (though not buggy) behavior of some package we use. Although there is
> an easy fix (or at least workaround) on our end without any apparent
> side effect, he strongly suggested extending
On Feb 4, 2:05 pm, Tomas Pelka wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hey,
>
> is there possibility how to run part of my code (function for example)
> as superuser.
>
> Or only way how to do this is create a wrapper and run is with Popen
> through sudo (but I have to configu
On Feb 2, 5:01 pm, Jonathan Gardner
wrote:
> On Feb 1, 6:36 pm, John Bokma wrote:
>
>
>
>
>
> > Jonathan Gardner writes:
> > > One of the bad things with languages like perl
>
> > FYI: the language is called Perl, the program that executes a Perl
> > program is called perl.
>
> > > without paren
On Jan 27, 9:22 am, Daniel Fetchinson
wrote:
> >> Hi folks,
>
> >> I was going to write this post for a while because all sorts of myths
> >> periodically come up on this list about python 3. I don't think the
> >> posters mean to spread false information on purpose, they simply are
> >> not aware
On Jan 27, 2:03 pm, Paul Rubin wrote:
> a...@pythoncraft.com (Aahz) writes:
> > From my POV, your question would be precisely identical if you had
> > started your project when Python 2.3 was just released and wanted to
> > know if the libraries you selected would be available for Python 2.6.
>
>
On Jan 2, 9:35 pm, Dave Angel wrote:
> Steven D'Aprano wrote:
> > On Sat, 02 Jan 2010 09:40:44 -0800, Aahz wrote:
>
> >> OTOH, if you want to do something different depending on whether the
> >> file exists, you need to use both approaches:
>
> >> if os.path.exists(fname):
> >> try:
> >>
On Dec 14, 11:44 pm, Terry Reedy wrote:
> On 12/14/2009 7:37 PM, Gabriel Genellina wrote:
>
>
>
> > En Mon, 14 Dec 2009 18:09:52 -0300, Nobody escribió:
> >> On Sun, 13 Dec 2009 22:56:55 -0800, sjdevn...@yahoo.com wrote:
>
> >>> The 3.1 documentat
On Dec 14, 4:09 pm, Nobody wrote:
> On Sun, 13 Dec 2009 22:56:55 -0800, sjdevn...@yahoo.com wrote:
> > The 3.1 documentation specifies that file.read returns bytes:
> > Does it need fixing?
>
> There are no file objects in 3.x.
Then the documentation definitely needs fixing;
On Dec 14, 1:57 pm, Dennis Lee Bieber wrote:
> On Sun, 13 Dec 2009 22:56:55 -0800 (PST), "sjdevn...@yahoo.com"
> declaimed the following in
> gmane.comp.python.general:
>
>
>
>
>
>
>
> > The 3.1 documentation specifies that file.read returns bytes
On Dec 13, 5:56 pm, "Rhodri James"
wrote:
> On Sun, 13 Dec 2009 06:44:54 -, Steven D'Aprano
>
> wrote:
> > On Sat, 12 Dec 2009 22:15:50 -0800, daved170 wrote:
>
> >> Thank you all.
> >> Dennis I really liked you solution for the issue but I have two question
> >> about it:
> >> 1) My origin
24 matches
Mail list logo