Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Can I safely remove all u-strings from a project that will only use python 3?

I work on a project that includes many u"string" in its codebase,

I want to know if I can safely remove the u in front of all those strings knowing that the project will only use Python 3 from now on (it used to use both python 2 and 3)

I have only one source that says :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

"The string prefix u is used exclusively for compatibility with Python
2."

>Solution :

Yes. I think you can. Unicode strings are not necessary in Python 3, because all strings are stored as Unicode by default, as stated here.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading