f python?

David Canzi dmcanzi at uwaterloo.ca
Sun Apr 8 13:03:28 EDT 2012


Xah Lee  <xahlee at gmail.com> wrote:
>hi guys,
>
>sorry am feeling a bit prolifit lately.
>
>today's show, is: 'Fuck Python'
>http://xahlee.org/comp/fuck_python.html
>
>------------------------------------
>Fuck Python
> By Xah Lee, 2012-04-08
>
>fuck Python.
>
>just fucking spend 2 hours and still going.
>
>here's the short story.
>
>so recently i switched to a Windows version of python. Now, Windows
>version takes path using win backslash, instead of cygwin slash. This
>fucking broke my find/replace scripts that takes a dir level as input.
>Because i was counting slashes.
>
>Ok no problem. My sloppiness. After all, my implementation wasn't
>portable. So, let's fix it. After a while, discovered there's the
>'os.sep'. Ok, replace "/" to 'os.sep', done. Then, bang, all hell
>went lose. Because, the backslash is used as escape in string, so any
>regex that manipulate path got fucked majorly.

When Microsoft created MS-DOS, they decided to use '\' as
the separator in file names.  This was at a time when several
previously existing interactive operating systems were using
'/' as the file name separator and at least one was using '\'
as an escape character.  As a result of Microsoft's decision
to use '\' as the separator, people have had to do extra work
to adapt programs written for Windows to run in non-Windows
environments, and vice versa.  People have had to do extra work
to write software that is portable between these environments.
People have done extra work while creating tools to make writing
portable software easier.  And people have to do extra work when
they use these tools, because using them is still harder than
writing portable code for operating systems that all used '/'
as their separator would have been.

If you added up the cost of all the extra work that people have
done as a result of Microsoft's decision to use '\' as the file
name separator, it would probably be enough money to launch the
Burj Khalifa into geosynchronous orbit.

So, when you say fuck Python, are you sure you're shooting at the
right target?

-- 
David Canzi	| TIMTOWWTDI (tim-toe-woe-dee): There Is More Than One
		| Wrong Way To Do It



More information about the Python-list mailing list