[Python-Dev] slice notation and RDF

Magnus Lie Hetland magnus@hetland.org
Sat, 4 May 2002 02:19:08 +0200


Damien Morton <Damien.Morton@acm.org>:
[snip]
> { 1:2, 3:4 } <--> dict([slice(1,2), slice(3,4)])
>  
> For RDF notation, you could then happily write:
>  
> {1:2:3, 4:5:6, 7:8:9} --> dict([slice(1,2,3), slice(4,5,6),
> slice(7,8,9)])

Hm. Is it really necessary to invent a new notation for this? The link
between these tuple-like structures (e.g. 1:2:3) and slices seems
tenuous and very confusing to me. If we're not going with the W3C XML
notation, why not use a more Pythonic one?

Assuming that we'll eventually get sets, should the
Python-RDF-notation simply be a set of 3-tuples? E.g:

  {(1, 2, 3), (4, 5, 6), (7, 8, 9)}

--
Magnus Lie Hetland                                  The Anygui Project
http://hetland.org                                  http://anygui.org