GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [Python-Dev] Slice as a copy... by design?
  • [Python-Dev] Slice as a copy... by design?
  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] Slice as a copy... by design?

[Python-Dev] Slice as a copy... by design?

Isaac Morland ijmorlan at cs.uwaterloo.ca
Thu May 22 20:23:10 CEST 2008

  • Previous message: [Python-Dev] Slice as a copy... by design?
  • Next message: [Python-Dev] Slice as a copy... by design?
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

On Thu, 22 May 2008, Christian Heimes wrote:

> The buffer interface was designed for the slice-as-copy use case:
>
>>>> a = "abcdefg"
>>>> b = buffer(a, 2, 3)
>>>> b
> <read-only buffer for 0x839c2e0, size 3, offset 2 at 0x8391c40>
>>>> str(b)
> 'cde'
[....]

This answers my musing about shared slices.  But it points me at another 
question: why is buffer() listed in "Non-essential Built-in Functions"? 
While it is obviously not essential like str() or list(), it isn't 
deprecated like apply().  On the other hand, some other built-in functions 
listed under "Built-in Functions" are probably also not essential (I'm not 
going to go any further out on the limb by giving an example!).

Perhaps I misunderstand the intent of this manual page.

http://docs.python.org/lib/non-essential-built-in-funcs.html#l2h-88

Isaac Morland			CSCF Web Guru
DC 2554C, x36650		WWW Software Specialist

  • Previous message: [Python-Dev] Slice as a copy... by design?
  • Next message: [Python-Dev] Slice as a copy... by design?
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the Python-Dev mailing list
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.