关于“核心Python编程”的观察 [英] Observation on "Core Python Programming"

查看:45
本文介绍了关于“核心Python编程”的观察的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,

我的第二版Chun''Core Python Programming"

(用户定义的)函数直到第11章才被引入,完全是400

页面进入书中。这与传统的

语言X简介形成鲜明对比。具有章节序列粗俗的书

喜欢:


第1章简介 - Hello World

第2章)变量

第3章)如果,if-else

第4章)循环

第5章)函数和/或子程序


确切的详细信息因书本和语言而异于

课程的语言,但通常以上主题都包含在前100-150

页面中在所有这些

工具都在您的手中之前,很难做任何有趣的事情。相比之下,Chun的书能够在Python内置函数的强大功能上覆盖相当多的相当有趣的东西(字典) ,文件IO,异常

处理等等。在介绍用户定义的函数之前。


我不想读太多内容,但仅以这种方式写一本Python书的事实似乎证实了

电池包含在内。 Python的哲学。也许没有什么需要学习如何尽快卷起自己的电池。


-John Coleman

解决方案

我会认为这是一个遗漏。函数在

Python中非常重要。我认为用户/读者应该在介绍中很快看到_def_和_class_

语句。这本书的名字是

因此有些误导,因为功能在核心处。

Python。


函数应该是整数,字符串,文件,

列表和词典。在我的意见中,另一个重点是压力,即函数是一流的对象。换句话说

函数可以像字符串和数字一样传递!


-Nick Vatamaniuc

John Coleman写道:


问候,

我的第二版Chun''sCore Python Programming的副本

刚从亚马逊周五抵达。真正跳出来的是一个关于它如何对其主题进行排序的有趣特征,即

(用户定义的)函数直到第11章才被引入,完全是400

页面进入书中。这与传统的

语言X简介形成鲜明对比。具有章节序列粗俗的书

喜欢:


第1章简介 - Hello World

第2章)变量

第3章)如果,if-else

第4章)循环

第5章)函数和/或子程序


确切的详细信息因书本和语言而异于

课程的语言,但通常以上主题都包含在前100-150

页面中在所有这些

工具都在您的手中之前,很难做任何有趣的事情。相比之下,Chun的书能够在Python内置函数的强大功能上覆盖相当多的相当有趣的东西(字典) ,文件IO,异常

处理等等。在介绍用户定义的函数之前。


我不想读太多内容,但仅以这种方式写一本Python书的事实似乎证实了

电池包含在内。 Python的哲学。也许没有什么需要学习如何尽快推出自己的电池。


-John Coleman


Nick Vatamaniuc写道:


我会认为这是遗漏。函数在

Python中非常重要。我认为用户/读者应该在介绍中很快看到_def_和_class_

语句。这本书的名字是

因此有些误导,因为功能在核心处。

Python。



你读过这本书吗?


< / F>


A不会从DBECAFG中省略 - 它只是以非标准的

顺序出现。如果这本书简单地省略了函数,那么这将是一个令人震惊的遗漏。事实上,它只是一种奇怪的排序方式。
主题。功能在23章的第11章中 - 听起来像

核心这本书对我来说。


Chun确实强调了Python中函数的一流状态 -

这对我来说非常重要,因为我涉猎过在过去几年中使用函数式编程(主要是SML)并且

感兴趣的是看到Python真正的扩展感兴趣

"多范式" - 能够将功能性和命令性(和OO)

范式融合在一起。


-John Coleman


Nick Vatamaniuc写道:


我会认为这是遗漏。函数在

Python中非常重要。我认为用户/读者应该在介绍中很快看到_def_和_class_

语句。这本书的名字是

因此有些误导,因为功能在核心处。

Python。


函数应该是整数,字符串,文件,

列表和词典。在我的意见中,另一个重点是压力,即函数是一流的对象。换句话说

函数可以像字符串和数字一样传递!


-Nick Vatamaniuc


John Coleman写道:


问候,

我的第二版Chun''Core Python Programming"

刚从亚马逊周五抵达。真正跳出来的是一个关于它如何对其主题进行排序的有趣特征,即

(用户定义的)函数直到第11章才被引入,完全是400

页面进入书中。这与传统的

语言X简介形成鲜明对比。具有章节序列粗俗的书

喜欢:


第1章简介 - Hello World

第2章)变量

第3章)如果,if-else

第4章)循环

第5章)函数和/或子程序


确切的详细信息因书本和语言而异于

课程的语言,但通常以上主题都包含在前100-150

页面中在所有这些

工具都在您的手中之前,很难做任何有趣的事情。相比之下,Chun的书能够在Python内置函数的强大功能上覆盖相当多的相当有趣的东西(字典) ,文件IO,异常

处理等等。在介绍用户定义的函数之前。


我不想读太多内容,但仅以这种方式写一本Python书的事实似乎证实了

电池包含在内。 Python的哲学。也许没有什么需要学习如何尽快推出自己的电池。


-John Coleman


Greetings,
My copy of the second edition of Chun''s "Core Python Programming"
just arrived from Amazon on Friday. What really jumped out at me is an
interesting feature about how it sequences its topics, namely,
(user-defined) functions are not introduced until chapter 11, fully 400
pages into the book. This contrasts strongly with a traditional
"Introduction to language X" book which has a chapter sequence roughy
like:

Chapter 1) Intro - Hello World
Chapter 2) Variables
Chapter 3) If, if-else
Chapter 4) Loops
Chapter 5) Functions and/or subroutines

The exact details vary from book to book and language to language of
course, but usually the above topics are covered in the first 100-150
pages since it is hard to do anything interesting until all of these
tools are under your belt. Chun''s book by contrast is able, on the
strength of Python''s built-in functions, to cover a fair amount of
relatively interesting things (dictionaries, file IO, exception
handling, etc.) before introducing user-defined functions.

I don''t want to read too much into this, but the mere fact that it is
possible to write a Python book in this fashion seems to confirm the
"batteries are included" philosophy of Python. Perhaps there is less
need to learn how to roll your own batteries as soon as possible.

-John Coleman

解决方案

I would consider that an omission. Functions are very important in
Python. I think the user/reader should see the _def_ and _class_
statement fairly soon in the introduction. The name of the book is
thus somewhat misleading, because functions are at the "core" of
Python.

Functions should be right there with the integers, strings, files,
lists and dictionaries. Another important point to stress, in my
opinion, is that functions are first-class objects. In other words
functions can be passes around just like strings and numbers!

-Nick Vatamaniuc
John Coleman wrote:

Greetings,
My copy of the second edition of Chun''s "Core Python Programming"
just arrived from Amazon on Friday. What really jumped out at me is an
interesting feature about how it sequences its topics, namely,
(user-defined) functions are not introduced until chapter 11, fully 400
pages into the book. This contrasts strongly with a traditional
"Introduction to language X" book which has a chapter sequence roughy
like:

Chapter 1) Intro - Hello World
Chapter 2) Variables
Chapter 3) If, if-else
Chapter 4) Loops
Chapter 5) Functions and/or subroutines

The exact details vary from book to book and language to language of
course, but usually the above topics are covered in the first 100-150
pages since it is hard to do anything interesting until all of these
tools are under your belt. Chun''s book by contrast is able, on the
strength of Python''s built-in functions, to cover a fair amount of
relatively interesting things (dictionaries, file IO, exception
handling, etc.) before introducing user-defined functions.

I don''t want to read too much into this, but the mere fact that it is
possible to write a Python book in this fashion seems to confirm the
"batteries are included" philosophy of Python. Perhaps there is less
need to learn how to roll your own batteries as soon as possible.

-John Coleman


Nick Vatamaniuc wrote:

I would consider that an omission. Functions are very important in
Python. I think the user/reader should see the _def_ and _class_
statement fairly soon in the introduction. The name of the book is
thus somewhat misleading, because functions are at the "core" of
Python.

have you read the book?

</F>


A is not ommitted from DBECAFG - it just appears in a non-standard
order. If the book simply ommitted functions then it would be a
shocking ommission. As it is, it is just a curious way of sequencing
topics. Functions are in chapter 11 out of 23 chapters - sounds like
the "core" of the book to me.

Chun does emphasize the first-class status of functions in Python -
something which is fairly important to me since I have dabbled on and
off with functional programming the last few years (mostly SML) and am
interested in seeing the extend to which Python is genuinely
"multi-paradigm" - able to blend the functional and imperative (and OO)
paradigms together.

-John Coleman

Nick Vatamaniuc wrote:

I would consider that an omission. Functions are very important in
Python. I think the user/reader should see the _def_ and _class_
statement fairly soon in the introduction. The name of the book is
thus somewhat misleading, because functions are at the "core" of
Python.

Functions should be right there with the integers, strings, files,
lists and dictionaries. Another important point to stress, in my
opinion, is that functions are first-class objects. In other words
functions can be passes around just like strings and numbers!

-Nick Vatamaniuc
John Coleman wrote:

Greetings,
My copy of the second edition of Chun''s "Core Python Programming"
just arrived from Amazon on Friday. What really jumped out at me is an
interesting feature about how it sequences its topics, namely,
(user-defined) functions are not introduced until chapter 11, fully 400
pages into the book. This contrasts strongly with a traditional
"Introduction to language X" book which has a chapter sequence roughy
like:

Chapter 1) Intro - Hello World
Chapter 2) Variables
Chapter 3) If, if-else
Chapter 4) Loops
Chapter 5) Functions and/or subroutines

The exact details vary from book to book and language to language of
course, but usually the above topics are covered in the first 100-150
pages since it is hard to do anything interesting until all of these
tools are under your belt. Chun''s book by contrast is able, on the
strength of Python''s built-in functions, to cover a fair amount of
relatively interesting things (dictionaries, file IO, exception
handling, etc.) before introducing user-defined functions.

I don''t want to read too much into this, but the mere fact that it is
possible to write a Python book in this fashion seems to confirm the
"batteries are included" philosophy of Python. Perhaps there is less
need to learn how to roll your own batteries as soon as possible.

-John Coleman


这篇关于关于“核心Python编程”的观察的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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