[Python-checkins] peps: Make owner() and group() methods, rather than properties.
antoine.pitrou
python-checkins at python.org
Mon Nov 18 23:49:06 CET 2013
http://hg.python.org/peps/rev/bf0cb331281b
changeset: 5288:bf0cb331281b
user: Antoine Pitrou <solipsis at pitrou.net>
date: Mon Nov 18 23:49:02 2013 +0100
summary:
Make owner() and group() methods, rather than properties.
It didn't make sense to keep them as properties as all other metadata-querying APIs
are now exposed under the form of methods (e.g. is_dir(), etc.), and there's no
stat() caching anymore.
files:
pep-0428.txt | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pep-0428.txt b/pep-0428.txt
--- a/pep-0428.txt
+++ b/pep-0428.txt
@@ -594,12 +594,12 @@
False
The file owner and group names (rather than numeric ids) are queried
-through matching properties::
+through corresponding methods::
>>> p = Path('/etc/shadow')
- >>> p.owner
+ >>> p.owner()
'root'
- >>> p.group
+ >>> p.group()
'shadow'
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list