本文介绍了一般编码问题 - 编码风格......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 大家好, 因为我只是一个''手工艺''/初学者左右, 可以任何人提供我有一些(粗略)提示,关于如何增强代码 这里: http://calmar.ws/tmp/cal.html 干杯并非常感谢 calmar - calmar (o_岩石:LINUX +命令行界面 // \ V _ / _ http:/ /www.calmar.wsHi all,since I''m just a ''handicraft''/beginner or so,could anybody provide me with some (rough) hints, about how to enhance the codehere: http://calmar.ws/tmp/cal.htmlCheers and thanks a lotcalmar--calmar(o_ It rocks: LINUX + Command-Line-Interface//\V_/_ http://www.calmar.ws推荐答案 - 为什么这些{{{thingies there? - u se字符串插值,如Foo%s%i %(bar,1)而不是 连接字符串。 - 似乎你可以从一个类而不是一堆 功能&很少全局。没有必要对OO过于疯狂,但它有其优点 - 尝试使用像glade这样的东西 - 手工创建GUI很糟糕 big-timer :) - 阅读有关unicode和编码,它们的含义以及为什么以及何时以及b / b 使用什么。真。那个领域的大多数问题源于人们对这个话题一无所知,只是在时间里扭动自己 - 最后,把事情弄得乱七八糟。它真的不那么复杂。 - 当创建字符串键盘时,成语 dict(foo =" bar" ;, baz =" pillepalle") 有它的优点。 除此之外 - 看起来还不错给我。 Diez- why are these {{{ thingies there?- use string interpolation like "Foo %s %i" % ("bar", 1) instead ofconcatenating strings.- it seems that you could benefit from a class instead of a bunch offunctions & few globals. No need to go too crazy about OO, but it hasits merits- try using something like glade - creating GUIs by hand sucksbig-timer :)- read up about unicode and encodings, what they mean and why and whento use what. Really. Most problems in that field stem from people beingsort of ignorant on that topic and just wiggling themselves through allthe time - in the end, messing up stuff. It really _isn''t_ that complicated.- when creating string-keyed dicts, the idiomdict(foo="bar",baz="pillepalle")has its merits.Besides that - looks ok to me.Diez 我明白了,我也改变了。 非常感谢, marco - calmar (o_它摇滚:LINUX +命令行界面 // \ V _ / _ http://www.calmar.ws 这篇关于一般编码问题 - 编码风格......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 阿里云证书,YYDS! 05-22 22:30