Message370034
What do you think about readlink returning something like:
class Link(str):
print_name = None # type: str | None
@property
def friendly_name(self) -> str:
return self.print_name or self
os.readlink would always return one of these Link objects, and since it's a substr, it would behave the way it currently behaves, but with an additional property. This approach would expose the underlying duality of the "name" of a link or junction, such that tools that need a friendly name could use .friendly_name and tools that need to inspect the print name could do that... but for the cases that wish for the most precise target could use the default value. |
|
| Date |
User |
Action |
Args |
| 2020-05-26 21:55:30 | jaraco | set | recipients:
+ jaraco, paul.moore, tim.golden, zach.ware, eryksun, steve.dower |
| 2020-05-26 21:55:30 | jaraco | set | messageid: <1590530130.29.0.959862091018.issue40654@roundup.psfhosted.org> |
| 2020-05-26 21:55:30 | jaraco | link | issue40654 messages |
| 2020-05-26 21:55:29 | jaraco | create | |
|