Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93898 > unrolled thread
| Started by | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| First post | 2015-07-16 15:55 +1000 |
| Last post | 2015-07-16 15:55 +1000 |
| 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: Mapping, with sequence as key, wildcard and subsequence matching Ben Finney <ben+python@benfinney.id.au> - 2015-07-16 15:55 +1000
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2015-07-16 15:55 +1000 |
| Subject | Re: Mapping, with sequence as key, wildcard and subsequence matching |
| Message-ID | <mailman.558.1437026404.3674.python-list@python.org> |
Terry Reedy <tjreedy@udel.edu> writes: > On 7/15/2015 9:51 PM, Ben Finney wrote: > > What well-defined data type exists with the following properties: > > > > * Mapping, key → value. > > > > * Each key is a sequence (e.g. `tuple`) of items such as text strings. > > > > * Items in a key may be the sentinel `ANY` value, which will match any > > value at that position. > > > > * A key may specify that it will match *only* sequences of the same > > length. > > > > * A key may specify that it will match sequences with arbitrarily many > > additional unspecified items. > > Every key should signal which of the last two alterntives holds. One > can be a default. The signal can be 'in-band', in the tuple key > itself, or 'out-of-band', not in the tuple key. Thanks. The part which puzzle me though: How do we teach the mapping type about that matching behaviour? -- \ “Without cultural sanction, most or all of our religious | `\ beliefs and rituals would fall into the domain of mental | _o__) disturbance.” —John F. Schumaker | Ben Finney
Back to top | Article view | comp.lang.python
csiph-web