Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32505 > unrolled thread
| Started by | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| First post | 2012-10-30 14:21 -0700 |
| Last post | 2012-10-30 14:21 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Negative array indicies and slice() Ethan Furman <ethan@stoneleaf.us> - 2012-10-30 14:21 -0700
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2012-10-30 14:21 -0700 |
| Subject | Re: Negative array indicies and slice() |
| Message-ID | <mailman.3104.1351632673.27098.python-list@python.org> |
Andrew Robinson wrote: > I can see that the slice() function can pass in arbitrary arguments. > I'm not sure for lists, which is what the range is applied to, why an > argument like "a" would be part of a slice. Well, in my dbf.py Record class you can use the names of fields as the slice arguments, instead of having to remember the offsets. record['full_name':'zip4'] returns a tuple (or a list, I don't remember) of about 13 fields -- this is especially useful as that block of fields might not be in the same place in each table. ~Ethan~
Back to top | Article view | comp.lang.python
csiph-web