<div dir="ltr">On Fri, Oct 5, 2012 at 9:16 PM, Oleg Broytman <span dir="ltr"><<a href="mailto:phd@phdru.name" target="_blank">phd@phdru.name</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"> Some attributes are properties and some are methods. Which is which?</div>
Why .root is a property but .parents() is a method? .owner/.group are<br>
properties but .exists() is a method, and so on. .stat() just returns<br>
self._stat, but said ._stat is a property!<br>
<div class="im"><br></div></blockquote><div><br></div><div>Unobvious indeed. Maybe operations that cause OS api calls should have parens?</div><div><br></div><div>Also, I agree with <span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;font-weight:bold;white-space:nowrap">Paul Moore </span>that the naming at its current state may cause cross-platform bugs.</div>
<div><br></div><div>Though I don't understand why not to overload the "/" or "+" operators. Sounds more elegant than square brackets. Just make sure the op fails on anything other than Path objects.</div>
<div><br></div><div>I'm +1 on adding such a useful abstraction to python if and only if it were >= os.path on every front,</div><div><br></div><div>Yuval Greenfield</div></div></div>