Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: path module

Reply
Thread Tools

Re: path module

 
 
Just van Rossum
Guest
Posts: n/a
 
      07-08-2003
Skip Montanaro wrote:

> Just> a.join(b, c, d)
>
> Just> which I don't think is all that bad.
>
> Yes, but
>
> a/b/c/d
>
> is nicely analogous to Unix pathname syntax.


But when the items are variables, what you read is not what you get.
Often you'll want (some) literals, and then you get

path = basePath/"a"/"b"/"c"

....and _that_ I find quite horrible...

(Did I mention that / usually means divide in Python?

Just

 
Reply With Quote
 
 
 
 
Nick Vargish
Guest
Posts: n/a
 
      07-08-2003
Just van Rossum <> writes:

> (Did I mention that / usually means divide in Python?


I believe you did... But doesn't % usually mean modulo in Python?

:^)

Nick

--
# sigmask | 0.2 | 2003-01-07 | public domain | feed this to a python
print reduce(lambda x,y+chr(ord(y)-1),'Ojdl!Wbshjti!=obwAqbusjpu/ofu?','')
 
Reply With Quote
 
 
 
 
Peter Hansen
Guest
Posts: n/a
 
      07-08-2003
Nick Vargish wrote:
>
> Just van Rossum <> writes:
>
> > (Did I mention that / usually means divide in Python?

>
> I believe you did... But doesn't % usually mean modulo in Python?


I believe you'll find it's more common for it to mean "format",
but the point is that it is well understood that it means *either*,
depending on context.

Using / for this new concatenation-like behaviour is tantamount
to adding new syntax to Python again...

-Peter
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: module docstring, documentation,anything? please note is the module type/object NOT some module Maric Michaud Python 0 06-24-2006 12:42 PM
Path as a dictionary tree key? (was Re: PEP on path module forstandard library) Ron Adam Python 3 08-02-2005 04:27 AM
Server.MapPath() croaking with "failed to map path", but path is legal awbacker@gmail.com ASP .Net 0 05-12-2005 10:50 PM
Bizzare: Invalid path to Access mdb, path is good Keith-Earl ASP .Net 1 05-03-2004 03:25 PM
Tomcat returning 404 error when using additional path (/servlet/myServlet/extra/path/info) Mupota Muchelemba Java 1 02-04-2004 12:43 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57