On Sun, 5 Dec 2004 17:07:47 +0100, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> a suggestion: if you really want to be productive in python, forget about
> "is" for a while. good code doesn't copy stuff much, either, by the way.
> python's all about objects, and things that hold references to object
I didn't mean to be extremely rude. Just a little bit..~:-). sorry.
On Sun, 05 Dec 2004 12:09:22 -0800, Josiah Carlson <[EMAIL PROTECTED]> wrote:
>
[snip]
>
> Goodness, you got right snippy with the 'intellectual property' thing.
> I'm sorry if it sounded as if I had meant "I came up with this
Ishwor <[EMAIL PROTECTED]> wrote:
>
> On Sun, 05 Dec 2004 10:31:12 -0800, Josiah Carlson <[EMAIL PROTECTED]> wrote:
> >
> > "Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>
> > > a suggestion: if you really want to be productive in python, forget about
> > > "is" for a while.
>
> I know what Fredr
On Sun, 05 Dec 2004 10:31:12 -0800, Josiah Carlson <[EMAIL PROTECTED]> wrote:
>
> "Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
> > a suggestion: if you really want to be productive in python, forget about
> > "is" for a while.
I know what Fredrik means here (Thanx Frederick :) ) but IMHO if the
pa
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>
> Ishwor wrote:
>
> > I am trying some interactive examples here where i have come across
> > inconsistencies??? :O
>
> obsession with implementation artifacts is a premature optimization,
> and should be avoided.
[snip]
> a suggestion: if you rea
Ishwor wrote:
> I am trying some interactive examples here where i have come across
> inconsistencies??? :O
obsession with implementation artifacts is a premature optimization,
and should be avoided.
> Anyway heres whats bothering me
>
s = 'hello'
s[0]
> 'h'
s[:]
> 'hello'
m
Ishwor wrote:
On Sun, 05 Dec 2004 09:44:13 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote:
This behaviour is due to the way strings are handled. In some cases strings are
'interned' which
lets the interpreter keep only a single copy of a string. If you try it with a
list you get a
different result
On Sun, 05 Dec 2004 09:44:13 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote:
[snip]
>
> This behaviour is due to the way strings are handled. In some cases strings
> are 'interned' which
> lets the interpreter keep only a single copy of a string. If you try it with
> a list you get a
> differen
Ishwor wrote:
s = 'hello'
m = s[:]
m is s
True
I discussed the *is* operator with some of the pythoners before as
well but it is somewhat different than what i intended it to do. The
LP2E by Mark & David says -
" m gets a *full top-level copy* of a sequence object- an object with
the same value bu