Return the singleton screen object. If none exists at the moment, create a new one and return it, else return the existing one.
()
| 3673 | ### Screen - Singleton ######################## |
| 3674 | |
| 3675 | def Screen(): |
| 3676 | """Return the singleton screen object. |
| 3677 | If none exists at the moment, create a new one and return it, |
| 3678 | else return the existing one.""" |
| 3679 | if Turtle._screen is None: |
| 3680 | Turtle._screen = _Screen() |
| 3681 | return Turtle._screen |
| 3682 | |
| 3683 | class _Screen(TurtleScreen): |
| 3684 |