Tornado 6.5 Documentation
tornado.websocket • WebSocketClientConnection.write_message now accepts dict arguments for consistency with WebSocketHandler.write_message. • WebSocketClientConnection.write_message now raises an IPv6, or in unusual network configurations when localhost has multiple IP addresses. tornado.web • image/svg+xml is now on the list of compressible mime types. • Fixed an error on Python 3 when compression stack traces when the connection is closed. • WebSocketHandler.open now accepts *args, **kw for consistency with RequestHandler.get and related methods. • The Sec-WebSocket-Version header now includes all0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
write_message now accepts dict [https://docs.python.org/3/library/stdtypes.html#dict] arguments for consistency with WebSocketHandler.write_message. WebSocketClientConnection.write_message now raises an exception IPv6, or in unusual network configurations when localhost has multiple IP addresses. tornado.web image/svg+xml is now on the list of compressible mime types. Fixed an error on Python 3 when compression stack traces when the connection is closed. WebSocketHandler.open now accepts *args, **kw for consistency with RequestHandler.get and related methods.The Sec-WebSocket-Version header now includes all supported0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
库的结构。这个 GUI 库包含一些可供 开发者使用的类型,比如 Button 或 TextField。在此之上,gui 的用户希望创建自定义的可以 绘制于屏幕上的类型:比如,一个程序员可能会增加 Image,另一个可能会增加 SelectBox。 这个例子中并不会实现一个功能完善的 GUI 库,不过会展示其中各个部分是如何结合在一起 的。编写库的时候,我们不可能知晓并定义所有其他程序员希望创建的类型。我们所知晓的是 draw 方法时具体会发生什么,只要该值会有那个方法可供我们调用即可。 在拥有继承的语言中,可以定义一个名为 Component 的类,该类上有一个 draw 方法。其他的 类比如 Button、Image 和 SelectBox 会从 Component 派生并因此继承 draw 方法。它们各自都 可以重写 draw 方法来定义自己的行为,但是框架会把所有这些类型当作是 Component 的实例, Gecko/20100101 Firefox/99.0", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/ avif,image/webp,*/*;q=0.8", "Accept-Language: en-US,en;q=0.5", "Accept-Encoding: gzip, deflate0 码力 | 562 页 | 3.23 MB | 9 天前3
共 3 条
- 1