Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Function Annotation got NameError: name 'xxx' is not defined
Post: RE: Function Annotation got NameError: name 'xxx' ...

Okay, if like this, maybe Python strategy is going to be more like a language with strong type validation. Anyway, I will try '__future__' if could solve my problem, thank you!
Lance General Coding Help 6 5,281 Oct-23-2019, 03:13 AM
    Thread: Function Annotation got NameError: name 'xxx' is not defined
Post: RE: Function Annotation got NameError: name 'xxx' ...

(Oct-23-2019, 01:39 AM)ichabod801 Wrote: You can do the circular references within a function because the code within the function is not executed until you call the function. At that point the rele...
Lance General Coding Help 6 5,281 Oct-23-2019, 02:28 AM
    Thread: Function Annotation got NameError: name 'xxx' is not defined
Post: RE: Function Annotation got NameError: name 'xxx' ...

(Oct-22-2019, 02:08 PM)ichabod801 Wrote: PEP 3107 Wrote:All annotation expressions are evaluated when the function definition is executed, just like default values. This all seems consistent with PE...
Lance General Coding Help 6 5,281 Oct-22-2019, 11:58 PM
    Thread: Function Annotation got NameError: name 'xxx' is not defined
Post: Function Annotation got NameError: name 'xxx' is n...

I am introducing function annotation in my coding, but found both python and Pycharm will validate if the type in function annotation is valid, if a none defined type is used, it will raise error. It'...
Lance General Coding Help 6 5,281 Oct-22-2019, 07:36 AM

User Panel Messages

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