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 gregory.p.smith
Recipients Trundle, abacabadabacaba, benhoyt, brian.curtin, christian.heimes, eric.araujo, giampaolo.rodola, gregory.p.smith, loewis, ncoghlan, neologix, nvetoshkin, pitrou, rhettinger, serhiy.storchaka, socketpair, terry.reedy, tim.golden, torsten, twouters, vstinner
Date 2013-05-06.18:07:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAGE7PNKkFLz_uq77bstaWysp-cZ__AyQ8E84aAuV5LPx2KKwAQ@mail.gmail.com>
In-reply-to <CAH_1eM3S+HakCTj9BoifrWV8nqBs4x24NmD7MTO1sb0DDrAspw@mail.gmail.com>
Content
Actually I'm thinking this duck may only have a beak. Instead of a bunch of
fields of None I'd prefer just not having that attribute defined on the
object. I consider the os specific "stat-like" info from reading a
directory to be so os specific that i'd rather not let someone be confused
by it if it were to be returned up to a higher level caller. It's not a
stat.
On May 6, 2013 2:36 AM, "Charles-François Natali" <report@bugs.python.org>
wrote:

>
> Charles-François Natali added the comment:
>
> > I don't think that's true in general, or true of how other Python APIs
> work. For instance, many APIs return a "file-like object", and you can only
> do certain things on that object, depending on what the documentation says,
> or what EAFP gets you. Some file-like object don't support seek/tell, some
> don't support close, etc. I've seen plenty of walk-like-a-duck checks like
> this:
>
> Yes, I'm fully aware duck-typing ;-)
> But here, you're saying that "a duck has a beak, but it *may* have
> legs, a tail, etc".
> It's just looks wrong to me on so many levels.
>
> Please bring this up on python-dev.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue11406>
> _______________________________________
>
History
Date User Action Args
2013-05-06 18:07:11gregory.p.smithsetrecipients: + gregory.p.smith, loewis, twouters, rhettinger, terry.reedy, ncoghlan, pitrou, vstinner, giampaolo.rodola, christian.heimes, tim.golden, eric.araujo, Trundle, brian.curtin, benhoyt, torsten, nvetoshkin, neologix, abacabadabacaba, socketpair, serhiy.storchaka
2013-05-06 18:07:11gregory.p.smithlinkissue11406 messages
2013-05-06 18:07:11gregory.p.smithcreate