V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  saber000  ›  全部回复第 6 页 / 共 10 页
回复总数  199
1  2  3  4  5  6  7  8  9  10  
@aheadlead 开发一个函数的时候理应在docstring中注明这个函数会抛出什么异常,可往往是,这个函数的开发者也不知道这个函数会抛出什么异常.
把Exception给catch住,把当前异常的类型打日志,再reraise,运行一段时间后就能大概知道了
2015-07-30 15:24:25 +08:00
回复了 popbones 创建的主题 Python 为了一个面试遇到的技术题目写的代码,请大家指教指教
代码没仔细看,因为我其实没看懂题目,不过建议楼主看下django的序列化实现:
https://github.com/django/django/tree/master/django/core/serializers
@dslwind 握爪,西邮
初中的时候就对编程有浓厚的兴趣,高考报志愿的时候对电子/计算机/网络/通信的专业区别不是很了解,所以在备选的专业按往年分数线排名,很不幸被非计算机专业抓去了(计算机专业志愿排在后面).
大学四年一直纠结是不是要转专业,但是很多人劝着说不要,最后自学计算机相关课程+蹭课+培训班,参加软考考到程序设计师,现在水平不算太菜,但是比较遗憾的是没有进去学校最好的那几个计算机相关的实验室(跨院的不收).

专业:光信息科学与技术
工作:Python开发工程师
2015-07-17 10:01:42 +08:00
回复了 moonshile 创建的主题 分享创造 分享一个简单易懂、不需要语料库的分词程序~
ws = WordSegment(doc, max_word_len=2, min_aggregation=1, min_entropy=0.5)
ws.segSentence(doc)

为什么doc要传两次?
2015-07-14 14:21:17 +08:00
回复了 LuckyHJH 创建的主题 git 大家是怎么管理配置文件的?
我的程序会按照以下顺序找配置文件:/etc/config/xxx.cfg -> ~/config/xxx.cfg -> ./config/xxx.cfg
分别对应prod env -> dev env -> demo env
2015-07-14 14:13:22 +08:00
回复了 jell 创建的主题 Python 关于 python GIL 一些内部运行机理
@jell 谷歌机翻嘿嘿嘿嘿嘿嘿
2015-07-14 14:12:43 +08:00
回复了 jell 创建的主题 Python 关于 python GIL 一些内部运行机理
2015-07-13 12:00:31 +08:00
回复了 jell 创建的主题 Python 关于 python GIL 一些内部运行机理
1) When you blocked in os, if your code is a lot of waiting for the system, GIL will not disturb you because at this time you do not have to compile python bytecode
2) When you instructions simple internal execution, such as operating a large number of string or bit computing. GIL interference will not occur because these are acting on the bytecode
3) When you execute a C extension module. Numpy, python image libraries.
4) If you really depend on certain python code. Cython may also release GIL through with-statement
5) If it is not expanded to show C limit. Jython and Ironthon no GIL
6) PyPy also improved the previous limited by GIL disadvantage. (But PyPy has its own GIL)
2015-07-09 18:48:52 +08:00
回复了 51zhi 创建的主题 问与答 玩 V2EX 的人,坐标广东的居多
珠海
2015-07-09 18:44:14 +08:00
回复了 haixiu 创建的主题 职场话题 面试因为性格不和被拒了
主管最近水逆吧
2015-07-09 16:27:49 +08:00
回复了 junnplus 创建的主题 Python 一个基于 scrapy 的项目
@junnplus 还真是,我就瞅了眼items
2015-07-09 09:31:08 +08:00
回复了 junnplus 创建的主题 Python 一个基于 scrapy 的项目
问题的英文应该是Question吧,不是Problem...
2015-07-03 16:40:56 +08:00
回复了 junnplus 创建的主题 程序员 发个贴,压压惊
@junnplus 你是怎么改呢?
2015-07-03 15:53:27 +08:00
回复了 junnplus 创建的主题 程序员 发个贴,压压惊
经楼主提醒才发现自己的profile漏记了好多,要记得把git配置的用户名和邮箱配对了
https://github.com/MrLYC 求关注
2015-07-02 19:34:59 +08:00
回复了 OneAPM 创建的主题 Python Python 装饰器使用过程中的误区
有什么方法解决这些问题吗?
2015-07-02 10:48:09 +08:00
回复了 laoyuan 创建的主题 Python Python 里 try... except 要是能写成一行流就好了
1  2  3  4  5  6  7  8  9  10  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   969 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 42ms · UTC 20:12 · PVG 04:12 · LAX 12:12 · JFK 15:12
♥ Do have faith in what you're doing.