Message158539
| Author |
pitrou |
| Recipients |
amaury.forgeotdarc, asksol, brian.curtin, gregory.p.smith, jnoller, kristjan.jonsson, pitrou, santoso.wijaya, sbt, tim.golden |
| Date |
2012年04月17日.10:41:07 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334659208.3338.2.camel@localhost.localdomain> |
| In-reply-to |
<1334592136.72.0.358461405189.issue11750@psf.upfronthosting.co.za> |
| Content |
> sbt <shibturn@gmail.com> added the comment:
>
> s/_win32/_winapi/g
Overlapped's naming is still lagging behind :-)
Other than that, a comment:
+ def Close(self):
+ if not self.closed:
+ self.closed = True
+ _winapi.CloseHandle(self)
Since Close() can be called at shutdown (through __del__), it should
probably cache its references to globals (because of the unpredictable
order of module cleanup), like this:
+ def Close(self, CloseHandle=_winapi.CloseHandle):
+ if not self.closed:
+ self.closed = True
+ CloseHandle(self)
Otherwise, looks good (I haven't tested). |
|