← 输入框|github.com|刷新
Skip to content

In pure OOP mode, make go, turn etc. show a helpful error message #82

Open

Description

@cool-RR
No description provided.

Activity

  1. darvin commented on Oct 4, 2010

    @darvin

    hm. i implement it in turtleprocess, so it write helpful error message to system console. where i should move it to print in in-game console, how do you think?

  2. cool-RR commented on Oct 4, 2010

    @cool-RR
    MemberAuthor

    You don't have to think at all about moving any messages from one place to another. You do print('message') in the function, and it gets printed at the graphical shell.

  3. bittner commented on Sep 23, 2018

    @bittner
    Member

    Here are two ideas related to that:

    • Add the help text as a docstring to the function you're calling. Then you simply run print(self.__doc__) (or similar) generically to print help.
    • It may be a good idea to educate users/students on using the help() and dir() built-in functions to display help about a specific function they want to learn more about. IOW, printing Type "help(go)" to learn more about the "go" function. may be the way to go.

    Just my two cents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions