S60 Python 编程指南——定义函数
来源:百度文库 编辑:神马文学网 时间:2024/04/29 11:43:15
练习: 定义一个函数
*以下的示例展示了如何定义一个函数:
说明:
示例代码:
# Copyright (c) 2005 Jurgen Scheible
# defining a function
import appuifw
def afunction():
data = appuifw.query(u"Type a word:", "text")
appuifw.note(u"The typed word was: " +data, "info")
afunction()
代码说明:
# Copyright (c) 2005 Jurgen Scheible
# defining a simple function
import appuifw
# a function is definded with: def nameoffunction():
# be aware of the indentation! (4 x spacebar)
def afunction():
data = appuifw.query(u"Type a word:", "text")
appuifw.note(u"The typed word was: " +data, "info")
# a function is called with its name and brackets behind it
afunction()
*以下的示例展示了如何定义一个函数:
说明:
示例代码:
# Copyright (c) 2005 Jurgen Scheible
# defining a function
import appuifw
def afunction():
data = appuifw.query(u"Type a word:", "text")
appuifw.note(u"The typed word was: " +data, "info")
afunction()
代码说明:
# Copyright (c) 2005 Jurgen Scheible
# defining a simple function
import appuifw
# a function is definded with: def nameoffunction():
# be aware of the indentation! (4 x spacebar)
def afunction():
data = appuifw.query(u"Type a word:", "text")
appuifw.note(u"The typed word was: " +data, "info")
# a function is called with its name and brackets behind it
afunction()
S60 Python 编程指南——定义函数
S60 Python 编程指南——语法
S60 Python 编程指南——对话框和通知信息
函数式编程另类指南
XML Python 联合编程
Python 自省指南
Python 自省指南
《Python编程金典》读书笔记
[个人推荐]函数式编程另类指南[zz] - Focus on Architecture, ...
Nokia S60编程环境的建立
Re: [python-chinese] 关于python库指南的阅读
S60平台:使用DBMS APIs —总论
Web Service深度编程——Axis序列化/反序列化器开发指南
Web Service深度编程——Axis序列化/反序列化器开发指南
Symbian编程三部曲—明确开发对象,SDK工具下载指南
Shining Ray ? 函数式编程
[转帖]C 编程指南
网络socket编程指南
游戏编程指南
系统托盘编程完全指南
系统托盘编程完全指南
Google将限制Python语言的应用 开发社区热议 - Python编程 - Java...
Python: 50个能够满足所有需要的模块 - Python编程 - JavaEye新闻
linux宝库/python/最小的Zope编程 How-to