tag:blogger.com,1999:blog-8823133891942040386.post8376565870930059754..comments2024-01-26T13:29:17.112-08:00Comments on Koichi Tamura's blog: Path classhohehohe2 [at] gmail.comhttp://www.blogger.com/profile/03759348601978839903noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8823133891942040386.post-80753734808025795342010-04-26T08:45:14.475-07:002010-04-26T08:45:14.475-07:00Hmm...
You're right~Hmm...<br /><br />You're right~Drakehttps://www.blogger.com/profile/04095816283013687313noreply@blogger.comtag:blogger.com,1999:blog-8823133891942040386.post-39800660706171987242010-04-25T09:04:06.931-07:002010-04-25T09:04:06.931-07:00I thought about it but if it is a string, it shoul...I thought about it but if it is a string, it should be expected to behave as a string. For example when a Path object is passed to a function in a third party module, the function may expect the object as a regular str/unicode object and expect __eq__, __ne__, __getitem__ not to be overridden. It'll be more confusing than convenient.hohehohe2 [at] gmail.comhttps://www.blogger.com/profile/03759348601978839903noreply@blogger.comtag:blogger.com,1999:blog-8823133891942040386.post-38897609705018846062010-04-25T06:24:43.223-07:002010-04-25T06:24:43.223-07:00Then, how about making Path a subclass of str/unic...Then, how about making Path a subclass of str/unicode and overriding it's __eq__, __ne__ and __getitem__ ?Drakehttps://www.blogger.com/profile/04095816283013687313noreply@blogger.com