-3

I wanted to name a file I was using while learning Tuples_&_Functions.

This would be a .py file so it would be, Tuples_&_functions.py.

Is this syntax going to potentially lead to problems down the road and I should use and instead of &? Is it safe to use the ampersand in titles of files? I've had trouble with making sure titles are correct when writing in C before.

martineau
  • 119,623
  • 25
  • 170
  • 301
Stuzanne
  • 27
  • 6
  • The file name has nothing to do with code being able to run, if the file name makes it easy to remember what the file is about, by all means use that name – Devesh Kumar Singh Jul 13 '19 at 22:00
  • @DeveshKumarSingh - It was about using the ampersand character in the title, is this something that is likely to affect stability within a project? – Stuzanne Jul 13 '19 at 22:20
  • @DeveshKumarSingh - I followed that link all the way through and it proved inconclusive on the use of the &. " ...and sometimes :, (, ), &, ;, #,...." ref: https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words – Stuzanne Jul 13 '19 at 22:41

1 Answers1

0

Possible duplicate of: Allowed characters in filename

You wont experience problems with the ampersand character as long as you stay within the scope of a simple python "oneliner". If you ever should, you can still change the name.

Best practice is to avoid special characters from the beginning and this is also my recommendation for you.

Las
  • 68
  • 1
  • 6
  • also managed to find this: ".....SHOULD use English words wherever feasible (in many cases, abbreviations and technical terms are used which aren't English)." ref: https://www.python.org/dev/peps/pep-0008/ Which further supports your point. – Stuzanne Jul 13 '19 at 22:35