471,330 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

os.sep and os.path.sep

>>import os
>>hasattr(os, 'sep')
True
>>hasattr(os.path, 'sep')
True

By chance I noticed it.
Are there differences (I think not...)?
IMHO, if there are no differences os.path.sep should be removed since
it may be confusing.

Sep 9 '07 #1
1 5077
* billiejoex <gn****@gmail.com[2007-09-09 08:48:38]:
>import os
hasattr(os, 'sep')
True
>hasattr(os.path, 'sep')
True

By chance I noticed it.
Are there differences (I think not...)?
IMHO, if there are no differences os.path.sep should be removed since
it may be confusing.
If you lookup os module, not only os.sep but couple of other values are also imported from os.path.

from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep,
devnull)

Yes, you are right. There are no differences. They exists there for utility purposes. Removing them would be a bad idea.

--
O.R.Senthil Kumaran
http://uthcode.sarovar.org
Sep 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

31 posts views Thread by John Roth | last post: by
9 posts views Thread by Bengt dePaulis | last post: by
70 posts views Thread by Michael Hoffman | last post: by
34 posts views Thread by Reinhold Birkenfeld | last post: by
2 posts views Thread by Rob Cowie | last post: by
1 post views Thread by William Stacey [MVP] | last post: by
6 posts views Thread by bukzor | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.