On Fri, Apr 24, 2009 at 10:19 AM, Mark Tarver dr.mtar...@ukonline.co.ukwrote:
but also says that their representation is implementation dependent.
As far as I see this should mean that element access in Python should
run in constant time. Now if so this is a boon, because generally
When I
On Apr 25, 4:34 am, Michele Simionato michele.simion...@gmail.com
wrote:
which has some feature you may like. For instance,
there is a weak form of pattern matching built-in:
head, *tail = [1,2,3] # Python 3.0 only!
head
1
tail
[2, 3]
Good seeing yet another long time Perl feature
On Apr 26, 1:31 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Fri, 24 Apr 2009 21:01:10 -0700, Carl Banks wrote:
That's because Python lists aren't lists.
Surely you meant to say that Lisp lists aren't lists?
It-all-depends-on-how-you-define-lists-ly y'rs,
Yeah, the
On Sat, 25 Apr 2009 23:51:18 -0700, namekuseijin wrote:
On Apr 26, 1:31 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Fri, 24 Apr 2009 21:01:10 -0700, Carl Banks wrote:
That's because Python lists aren't lists.
Surely you meant to say that Lisp lists aren't lists?
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
On Sat, 25 Apr 2009 23:51:18 -0700, namekuseijin wrote:
On Apr 26, 1:31 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Fri, 24 Apr 2009 21:01:10 -0700, Carl Banks wrote:
That's because Python lists aren't
On 25 Apr, 05:01, Carl Banks pavlovevide...@gmail.com wrote:
On Apr 24, 8:19 am, Mark Tarver dr.mtar...@ukonline.co.uk wrote:
This page says that Python lists are often flexible arrays
http://www.brpreiss.com/books/opus7/html/page82.html
but also says that their representation is
What is different is the concept of all globals that
reference G. For example:
a = [1, 2, 3]
b = a
a[0] = 0
print b
[0, 2, 3]
I see that Python had an id too ;).
Mark
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 25, 9:07 am, Mark Tarver dr.mtar...@ukonline.co.uk wrote:
OK; I guess the answer to the question
Assuming the following Python encodings, and ignoring questions
of performance, would Python and Lisp lists then be observationally
indistinguishable? i.e. would these then be fair
Mark Tarver dr.mtar...@ukonline.co.uk writes:
Assuming the following Python encodings, and ignoring questions
of performance, would Python and Lisp lists then be observationally
indistinguishable? i.e. would these then be fair encodings?
is a 'yes'. Any disagreement?
I don't think it is
On Apr 25, 10:01 am, Paul Rubin http://phr...@nospam.invalid wrote:
Mark Tarver dr.mtar...@ukonline.co.uk writes:
Assuming the following Python encodings, and ignoring questions
of performance, would Python and Lisp lists then be observationally
indistinguishable? i.e. would these then be
On Apr 25, 12:07 am, Mark Tarver dr.mtar...@ukonline.co.uk wrote:
On 25 Apr, 05:01, Carl Banks pavlovevide...@gmail.com wrote:
On Apr 24, 8:19 am, Mark Tarver dr.mtar...@ukonline.co.uk wrote:
This page says that Python lists are often flexible arrays
On Sat, 25 Apr 2009 08:07:19 +0100, Mark Tarver
dr.mtar...@ukonline.co.uk wrote:
OK; I guess the answer to the question
Assuming the following Python encodings, and ignoring questions
of performance, would Python and Lisp lists then be observationally
indistinguishable? i.e. would these then
Mark Tarver dr.mtar...@ukonline.co.uk writes:
But are Python lists also indistinguishable from conventional
Lisplists for list processing.
For example, can I modify a Python list non-destructively?
No.
Are they equivalent to Lisp lists. Can CAR and CDR in Lisp be thought
of as
def
On Fri, 24 Apr 2009 21:01:10 -0700, Carl Banks wrote:
That's because Python lists aren't lists.
Surely you meant to say that Lisp lists aren't lists?
It-all-depends-on-how-you-define-lists-ly y'rs,
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
This page says that Python lists are often flexible arrays
http://www.brpreiss.com/books/opus7/html/page82.html
but also says that their representation is implementation dependent.
As far as I see this should mean that element access in Python should
run in constant time. Now if so this is a
Mark Tarver wrote:
This page says that Python lists are often flexible arrays
http://www.brpreiss.com/books/opus7/html/page82.html
but also says that their representation is implementation dependent.
As far as I see this should mean that element access in Python should
run in constant time.
Mark Tarver dr.mtar...@ukonline.co.uk writes:
But are Python lists also indistinguishable from conventional
Lisplists for list processing.
Forgot to add: you might look at http://norvig.com/python-lisp.html
Mark Tarver dr.mtar...@ukonline.co.uk writes:
But are Python lists also
Mark Tarver dr.mtar...@ukonline.co.uk writes:
But are Python lists also indistinguishable from conventional
Lisplists for list processing. For example, can I modify a Python
list non-destructively? Are they equivalent to Lisp lists. Can CAR
and CDR in Lisp be thought of as
Python lists are
On 24 Apr, 17:19, Paul Rubin http://phr...@nospam.invalid wrote:
Mark Tarver dr.mtar...@ukonline.co.uk writes:
But are Python lists also indistinguishable from conventional
Lisplists for list processing.
Forgot to add: you might look athttp://norvig.com/python-lisp.html
Mark Tarver
Mark Tarver dr.mtar...@ukonline.co.uk writes:
Ah; so this
def cons (x,y):
return [x] + y
is not accurate?
Depends what you mean by accurate!
in lisp, if you do:
(setq a '(1 2))
(setq b (cons 0 a))
(rplaca a 3)
Then
a is now (3 2)
b is now (0 3 2)
In Python, if
On 24 Apr, 19:54, Arnaud Delobelle arno...@googlemail.com wrote:
Mark Tarver dr.mtar...@ukonline.co.uk writes:
Ah; so this
def cons (x,y):
return [x] + y
is not accurate?
Depends what you mean by accurate!
in lisp, if you do:
(setq a '(1 2))
(setq b (cons 0 a))
On Sat, 25 Apr 2009 00:32:26 +0100, Mark Tarver
dr.mtar...@ukonline.co.uk wrote:
OK; I think I get it. RPLACA and RPLACD are part of the id of Common
Lisp which I rarely contemplate. However what it seems to be is that
the difference is this. Lisp operates a destructive operation like
On Apr 24, 8:19 am, Mark Tarver dr.mtar...@ukonline.co.uk wrote:
This page says that Python lists are often flexible arrays
http://www.brpreiss.com/books/opus7/html/page82.html
but also says that their representation is implementation dependent.
As far as I see this should mean that element
23 matches
Mail list logo