os.symlink()

N

Nikolaus Rath

Hello,
From `pydoc os`:

symlink(...)
symlink(src, dst)

Create a symbolic link pointing to src named dst.


Is there any reason why this is so deliberately confusing? Why is the
target of the symlink, the think where it points *to*, called the
`src`? It seems to me that the names of the parameters should be
reversed.



Puzzled,

-Nikolaus

--
»It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that.«
-J.H. Hardy

PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
 
D

Diez B. Roggisch

Nikolaus said:
Hello,


symlink(...)
symlink(src, dst)

Create a symbolic link pointing to src named dst.


Is there any reason why this is so deliberately confusing? Why is the
target of the symlink, the think where it points *to*, called the
`src`? It seems to me that the names of the parameters should be
reversed.

I used the command the other day, and didn't feel the slightest confusion.

To me, the process of creating a symlink is like a "virtual copy". Which the
above parameter names reflect perfectly.


Diez
 
N

Nikolaus Rath

Diez B. Roggisch said:
I used the command the other day, and didn't feel the slightest confusion.

To me, the process of creating a symlink is like a "virtual copy".
Which the above parameter names reflect perfectly.

Is this interpretation really widespread? I couldn't find any other
sources using it. On the other hand:
From ln(2):

,----
| SYNOPSIS
| ln [OPTION]... [-T] TARGET LINK_NAME (1st form)
|
| DESCRIPTION
| In the 1st form, create a link to TARGET with the name LINK_NAME.
`----
From Wikipedia:

,----
| A symbolic link merely contains a text string that is interpreted and
| followed by the operating system as a path to another file or
| directory. It is a file on its own and can exist independently of its
| target. If a symbolic link is deleted, its target remains unaffected.
| If the target is moved, renamed or deleted, any symbolic link that
| used to point to it continues to exist but now points to a
| non-existing file.
`----


Best,


-Nikolaus

--
»It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that.«
-J.H. Hardy

PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top