Shang
Shang

Reputation: 75

A string variable becomes a tuple

Update: Fixed the problem. I have commas behind my strings because I copied an pasted them over a dictionary.

I have a config.py file with some string variables inside like

MAIL_SERVER='email-smtp.us-east-1.amazonaws.com',

However, when I import it into another class, the variable becomes a tuple.

type(config.MAIL_SERVER) # result <type 'tuple'>

Can someone share some knowledge on this behavior? Thanks.

Upvotes: 1

Views: 1031

Answers (1)

Moinuddin Quadri
Moinuddin Quadri

Reputation: 48067

I think you are having , after the string. Removal of that should fix the issue.

Upvotes: 3

Related Questions