使用时使用 pygame.Color 名称的正确方法是什么unicode_literals
?
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
>>> pygame.ver
'1.9.2pre'
>>> pygame.Color('red')
(255, 0, 0, 255)
>>> from __future__ import unicode_literals
>>> pygame.Color('red')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid argument