> > Another Point:[color=blue][color=green]
> > Should Path be immutable like string?[/color]
>
> I have though about this, too. It should certainly not be fully mutable,
> because if a path changes, it changes. But maybe we could have a
> .normalise_inpl ace() which mutates the Path? What consequences would
> this have for hashability?
>
> I like paths to be hashable. so they probably should be immutable.[/color]
I agree... paths should be immutable.
Instead of .normalize_inpl ace() which changes the behavior of the
Path, how about .get_normalized _string() (please find a better name)
which allows access to the normalized version without mutating the
Path object? (Or perhaps it should be .get_normalized _Path()... I'm
not sure.)
-- Michael Chermside
> > Should Path be immutable like string?[/color]
>
> I have though about this, too. It should certainly not be fully mutable,
> because if a path changes, it changes. But maybe we could have a
> .normalise_inpl ace() which mutates the Path? What consequences would
> this have for hashability?
>
> I like paths to be hashable. so they probably should be immutable.[/color]
I agree... paths should be immutable.
Instead of .normalize_inpl ace() which changes the behavior of the
Path, how about .get_normalized _string() (please find a better name)
which allows access to the normalized version without mutating the
Path object? (Or perhaps it should be .get_normalized _Path()... I'm
not sure.)
-- Michael Chermside