noob问题 [英] noob question

查看:73
本文介绍了noob问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


对python来说很新,所以这是一个noob问题。当我在过去用

JavaScript或MEL编写内容时,我总是采用变量命名

使用$作为第一个字符的约定(不,我不使用perl,

从来没有。在python中不可能。人们通常使用哪些好的选项,以便他们可以轻松快速地识别出b
变量?当我在SoftImage中编写内容时,SDK中的许多示例只使用了一个较低的

案例o,但我想要一些更加明显。我不是一个超级

高级用户,我刚刚开始使用python(几乎只是

通过学习Python工作,大约在160页左右) 。

好​​像是一种非常容易阅读的_extremely_ elegent语言,所以

我认为这不是一个与其他问题一样多的问题br />
语言。不过,我想看看其他人做了什么,以及对于这类事情有什么好主意。


感谢您提出的所有想法。


欢呼,

-Matt

Hello,

Very new to python, so a noob question. When I''ve written stuff in
JavaScript or MEL in the past, I''ve always adopted the variable naming
convention of using a $ as the first character (no, I don''t use perl,
never have). Not possible in python. What are some good options that
people commonly use so that they can easily and quickly identify
variable with just a glance? When I was writing stuff in SoftImage
XSI/JScript, many of the examples in the SDK used just a leading lower
case o, but I''d like somethign that''s more visible. I''m not a super
advanced user and am just starting out in python (pretty much just
working my way through Learning Python, at around page 160 or so).
Seems like an _extremely_ elegent language that is very easy to read, so
I suppose it''s not really as much of an issue as it is with other
languages. Still, I would like to see what other people do and what are
some good ideas for this kind of thing.

Thank you for any and all ideas.

cheers,

-Matt

推荐答案

作为第一个角色(不,我不使用perl,

从来没有)。在python中不可能。人们通常使用哪些好的选项,以便他们可以轻松快速地识别出b
变量?当我在SoftImage中编写内容时,SDK中的许多示例只使用了一个较低的

案例o,但我想要一些更加明显。我不是一个超级

高级用户,我刚刚开始使用python(几乎只是

通过学习Python工作,大约在160页左右) 。

好​​像是一种非常容易阅读的_extremely_ elegent语言,所以

我认为这不是一个与其他问题一样多的问题br />
语言。不过,我想看看其他人做了什么,以及对于这类事情有什么好主意。


感谢您提出的所有想法。


欢呼,

-Matt

as the first character (no, I don''t use perl,
never have). Not possible in python. What are some good options that
people commonly use so that they can easily and quickly identify
variable with just a glance? When I was writing stuff in SoftImage
XSI/JScript, many of the examples in the SDK used just a leading lower
case o, but I''d like somethign that''s more visible. I''m not a super
advanced user and am just starting out in python (pretty much just
working my way through Learning Python, at around page 160 or so).
Seems like an _extremely_ elegent language that is very easy to read, so
I suppose it''s not really as much of an issue as it is with other
languages. Still, I would like to see what other people do and what are
some good ideas for this kind of thing.

Thank you for any and all ideas.

cheers,

-Matt


Matt Hollingsworth <毫安** @ maudit.net>写道:
Matt Hollingsworth <ma**@maudit.net> writes:
人们通常使用哪些好的选项,以便他们能够轻松快速地识别变量?
What are some good options that people commonly use so that they can
easily and quickly identify variable with just a glance?




使用具有Python语法高亮模式的编辑器,例如

带有python-mode,Vim的Emacs或Python附带的IDLE IDE。


-

Bj ?? rn Lindstr ?? m< bk ** @ stp.ling.uu.se>

计算学生语言学,瑞典乌普萨拉大学



Use an editor that has a Python syntax highlighting mode, for example
Emacs with python-mode, Vim, or the IDLE IDE that comes with Python.

--
Bj??rn Lindstr??m <bk**@stp.ling.uu.se>
Student of computational linguistics, Uppsala University, Sweden


要识别您已分配的变量,只需查找

分配。如果你的代码是可读的,并且你知道的很好,那么你不需要
To recognize variables that you have assigned, just look for
assignment. If your code is readible, and you know it well, you
shouldn''t need the

这篇关于noob问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆