0

I've been working with a project were there are couple of Constants which i need to put and read it back.

So far the Enum seems works with small text and simple numbers.

Sample:

  class AppConstants(Enum):
     CLIENT_ID = "913940213390-k7ubu14.apps.example.com"

The above doesn't work as it contains hyphen. without the hyphen it works. The dafjdl32323232-dfasfsaf and fdsfndsfsdfj-7687 doesn't work either.

So when I call AppConstants.CLIENT_ID, it stops with hyphen and cannot read the full value.

1 Answer 1

2

What does not work?

class AppConstants():   
    CLIENT_ID = "913940213390-k7ubu14.apps.example.com-somehyphens.letsbringmorehyphens-more-okay--34534-enough"
print(AppConstants.CLIENT_ID)

OUTPUT:

913940213390-k7ubu14.apps.example.com-somehyphens.letsbringmorehyphens-more-okay--34534-enough
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.