Quoting Mathieu Bridon (2018-07-06 02:34:56) > On Thu, 2018-07-05 at 09:14 -0700, Dylan Baker wrote: > > Does it make more sense to encode, or to use io.open and open the > > file in text mode? I've gone back and forth on this myself several > > times. > > Same here, both seem equally valid and I can't really make my mind up > on which one to pick. > > The general recommendation with Python 3 is to use unicode strings > everywhere, and only encode/decode at the boundaries. > > I guess the boundary is actually writing to the file, so opening it in > text mode and handling unicode strings (not encode them ourselves) fits > that a bit better? > > It seems like a very weak argument though in this specific case, since > we're not really doing anything with the byte-string other than just > writing it directly to the file. > > Do you want me to do a v2 with that change? > > > -- > Mathieu
Eh, it's not a big deal either way. Lets just leave this as-is for now and we can change it later if we decide we'd prefer to do that. Like when we drop python 2.7 support. Dylan
signature.asc
Description: signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev