@ashwinvis @feoh Correct. But this is not the case throughout the standard library; for instance, dbm can't open that file. Can't fit it all in a toot. I wrote about it with more nuance at and . In short, I don't think 3 is suitable for systems or scripting work anymore. It is too dang hard to just handle filenames correctly.

@jgoerzen @ashwinvis What do you propose instead? To be honest I've never encountered anything but ASCII filenames in all my years of infrastructure work. Obviously full unicode support is important but nowhere near enough to disqualify a language in very wide use that clearly works very well for a whole lot of people.

@feoh @ashwinvis I guess the alternative depends on the needs. I'm sure Pythong is still suitable for some things. But the problem here isn't that it can't handle Unicode; it's that it can't handle non-Unicode very well, and this sets it up for bugs and issues in a lot of scenarios. So for instance, I have Gopher mirrors from the 90s, before Unicode, and there are many filenames that are in ISO-8859-1 or similar that are a real mess in Python 3

@jgoerzen @ashwinvis OK. So it's not good for your use case. That's cool. I can totally buy that, but there is a HUGE different between saying "Python 3 no longer works for my use case" and "Python 3 isn't suitable for systems and scripting work anymore" when the BigCo I work for churns out literally thousands of lines a day in mission critical systems.

@feoh @ashwinvis Well I said that in the context of "what's your go-to scripting language?".

So bash has a lot of similar (or worse) bugs handling filenames. People still use it. It does have workarounds, though you have to know how to use them carefully.

Python 3 doesn't even have workarounds in many places. Do you want something that will crash if \xF7 is in a filename? That's just not robust coding practices. You've got to handle the unexpected-but-valid. And it's HARD in python 3.

@jgoerzen @ashwinvis Not arguing with that at all. Everything has bugs and can be improved upon, Python 3 is no exception :)

@jgoerzen @ashwinvis Also, given that Python 3 has the problems you outlines, what *is* your goto scripting language? Sincerely curious.

@feoh @ashwinvis For personal projects, it's bash for simpler things and for more complicated ones. Sometimes . Yeah, I know, Rust is compiled and Haskell also (usually) is, but both have type inference and don't require a lot of verbosity to use. I am a strong believer in correctness and often need it in my scripts, so having the robust type checking & error system in Rust is perfect for a lot of that. (I also rigorously use set -e and pipefail in bash)

Sign in to participate in the conversation

For people who care about, support, or build Free, Libre, and Open Source Software (FLOSS).