This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jaraco
Recipients eryksun, jaraco, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-05-26.21:55:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590530130.29.0.959862091018.issue40654@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-05-26 21:55:30jaracosetrecipients: + jaraco, paul.moore, tim.golden, zach.ware, eryksun, steve.dower
2020-05-26 21:55:30jaracosetmessageid: <1590530130.29.0.959862091018.issue40654@roundup.psfhosted.org>
2020-05-26 21:55:30jaracolinkissue40654 messages
2020-05-26 21:55:29jaracocreate