0

Constants are usually evident from ALL_CAPS names, and near the top of modules, however, it is not clear to me how one defines a constant. Is a constant:

  • A) A reference to a value which is not intended to be changed throughout the life of the software (e.g. PI=3.1416)

  • B) A reference to a value which is expected to be changed throughout the life of the software (e.g. CUSTOMER_FILE=r'\data\customer_info.csv' )

  • C) Both?

miradulo
  • 28,857
  • 6
  • 80
  • 93
cammil
  • 9,499
  • 15
  • 55
  • 89
  • Python doesn't have a concept of a constant, this is merely an (in)formal convention. Constants as such are expected to be, well, constant, and not change. As such, I find your question confusing and unclear. – deceze Apr 09 '15 at 14:28
  • ... and probably homework. – Daniel Roseman Apr 09 '15 at 14:35

0 Answers0