Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: string literals in a list. Not what I expected.
Post: RE: string literals in a list. Not what I expected...

@perfringo Thanks for the link. So yes it is legal. Though in my opinion it is dangerous and easily introduces errors. A pity the '+' operator is only required for runtime but not for compile ti...
tycarac General Coding Help 3 2,698 Dec-28-2019, 05:31 AM
    Thread: string literals in a list. Not what I expected.
Post: string literals in a list. Not what I expected.

Hi I saw unexpected Python behavior (to me) with string literals in a list. If I miss a comma in the list sequence, then the two string literals are merged into on string. What I had expected was a...
tycarac General Coding Help 3 2,698 Dec-27-2019, 10:52 AM
    Thread: Python error? Enum and strings
Post: RE: Python error? Enum and strings

Hey buran Many thanks. You were right. I feel a bit silly having posted such a simple mistake.
tycarac General Coding Help 3 3,595 Dec-15-2018, 10:39 AM
    Thread: Python error? Enum and strings
Post: Python error? Enum and strings

Hi To get the output 'first' as the printed enum value that I want , I have to use 'value[0]' instead of 'value'. from enum import Enum class BadEnum(Enum): def __str__(self): return se...
tycarac General Coding Help 3 3,595 Dec-15-2018, 05:44 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020