<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 7, 2012, at 5:07 PM, Mike Meyer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Is there any reason a file object's boolean value shouldn't be false<br>once it's been closed? </span></blockquote><br></div><div>Because that would make it harder to learn what things in Python can be False and what that implies.</div><div><br></div><div>Currently, None is always false, numbers are false when they are zero, and containers are false when they are empty.</div><div><br></div><div>Files objects don't fit into that model.  Some would question whether a file could be considered a container.  Even if a file was considered a container, there is still an important distinction between files that are closed versus files that are empty (i.e. they have a length of zero).</div><div><br></div><div>Lastly, the file API is adopted by many objects, so we would need to change them all.</div><div><br></div><div><br></div><div><br></div><div>Raymond</div><br></body></html>