Talin <[EMAIL PROTECTED]> wrote:
> I'd like to replace this with:
> 
>     .component( slice_object )
> 
> where the semantics of 'component' are identical to __getitem__ on an 
> array or tuple. So for example:
> 
>     Path( "a", "b" ).component( 0 ) => "a"
>     Path( "a", "b" ).component( 1 ) => "b"
>     Path( "a", "b" ).component( -1 ) => "b"
>     Path( "a", "b" ).component( 0:1 ) => Path( "a", "b" )
>     Path( "a", "b" ).component( 1: ) => Path( "b" )

Use a property or list or something.  Something with __getitem__.  In
2.5 it is a syntax error to use slices like that, and it would seem
silly to change 3.x syntax to be able to pass slices directly like that.


 - Josiah

_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to