prodesire / python-guide-cn Goto Github PK
View Code? Open in Web Editor NEWPython最佳实践指南。 The chinese translation of "Hitchhiker's Guide to Python".
License: Other
Python最佳实践指南。 The chinese translation of "Hitchhiker's Guide to Python".
License: Other
https://pythonguidecn.readthedocs.io/zh/latest/writing/structure.html#id14
tuple 只有在其内元素都是不可变对象的时候才可以作为 key;否则不行,嵌套的 tuple 中有可变元素也不行
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> t = (1, [2, 3])
>>> type(t)
<class 'tuple'>
>>> d = {}
>>> d[t] = 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'list'
>>>
希望可以上线Gitbook,gitbook有很好的阅读体验。
Could you please provide ePub downloads for reading offline? Thank you.
This page contains the following errors:
error on line 34 at column 56: Specification mandates value for attribute async
Below is a rendering of the page up to the first error.
地址: https://pythonguidecn.readthedocs.io/zh/latest/dev/virtualenvs.html#id3
~ 会扩展为您的家目录的局对路径
中的局对路径->绝对路径
局对路径->绝对路径
Python中更可能出现馄饨代码:这类代码包含上百段相似的逻辑碎片,通常是缺乏 合适结构的类或对象,如果你始终弄不清手头上的任务应该使用FurnitureTable, AssetTable还是Table,甚至TableNew,也许你已经陷入了馄饨代码中
raise Exception("馄饨 -> 混沌")
有没有饺子代码,在线等挺急的
感谢。
机器学习章节下面,scipy 的介绍内容,
SciPy 栈由数据科学所使用的一组核心帮助包组成,用于统计分析和数据可视化。 由于其庞大的功能和易用性,scripy栈被认为是大多数数据科学应用的必备条件。
首页对“确保您的毛巾在哪”理解有误,towel 浴巾的梗出自著名科幻小说《银河系漫游指南》,按照书中设定进行星际旅行最重要的是确保拥有浴巾。原文如下:
A towel, it says, is about the most massively useful thing an interstellar hitchhiker can have. Partly it has great practical value - you can wrap it around you for warmth as you bound across the cold moons of Jaglan Beta; you can lie on it on the brilliant marble-sanded beaches of Santraginus V, inhaling the heady sea vapours; you can sleep under it beneath the stars which shine so redly on the desert world of Kakrafoon; use it to sail a mini raft down the slow heavy river Moth; wet it for use in hand-to- hand-combat; wrap it round your head to ward off noxious fumes or to avoid the gaze of the Ravenous Bugblatter Beast of Traal (a mindboggingly stupid animal, it assumes that if you can't see it, it can't see you - daft as a bush, but very ravenous); you can wave your towel in emergencies as a distress signal, and of course dry yourself off with it if it still seems to be clean enough. More importantly, a towel has immense psychological value. For some reason, if a strag (strag: non-hitch hiker) discovers that a hitch hiker has his towel with him, he will automatically assume that he is also in possession of a toothbrush, face flannel, soap, tin of biscuits, flask, compass, map, ball of string, gnat spray, wet weather gear, space suit etc., etc. Furthermore, the strag will then happily lend the hitch hiker any of these or a dozen other items that the hitch hiker might accidentally have "lost". What the strag will think is that any man who can hitch the length and breadth of the galaxy, rough it, slum it, struggle against terrible odds, win through, and still knows where his towel is is clearly a man to be reckoned with.
作者用这个著名的梗是想表明就要开始惊心动魄的“星际旅行”啦,因此这个译者注建议修改
(译者注:洗澡需要浴巾,大概是说先准备好环境)
本翻译项目实际上是在GitHub上新建的项目,而不是fork自Python-Guide,这是为了对这个翻译项目有更好的自由度。但即便是是fork过来的项目,也会有这样的问题。就是当我们翻译完某一部分后,原英文项目的对应部分进行了增删,这时我们并不知道它进行了修改,也很难知道它修改了哪些部分,我们就不能及时更新翻译,这样很难保证这个翻译项目是最新的内容。
请问大家有什么好的解决方案呢?欢迎踊跃讨论~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.