PRE-PEP: new Path class

  • Thread starter Michael Chermside
  • Start date
M

Michael Chermside

Another Point:
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_inplace() which mutates the Path? What consequences would
this have for hashability?

I like paths to be hashable. so they probably should be immutable.

I agree... paths should be immutable.

Instead of .normalize_inplace() 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top