Return the singleton screen object. If none exists at the moment, create a new one and return it, else return the existing one.
()
| 3807 | ### Screen - Singleton ######################## |
| 3808 | |
| 3809 | def Screen(): |
| 3810 | """Return the singleton screen object. |
| 3811 | If none exists at the moment, create a new one and return it, |
| 3812 | else return the existing one.""" |
| 3813 | if Turtle._screen is None: |
| 3814 | Turtle._screen = _Screen() |
| 3815 | return Turtle._screen |
| 3816 | |
| 3817 | class _Screen(TurtleScreen): |
| 3818 |