Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80943 > unrolled thread

Re: How modules work in Python

Started byBen Finney <ben+python@benfinney.id.au>
First post2014-11-17 12:23 +1100
Last post2014-11-17 12:23 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How modules work in Python Ben Finney <ben+python@benfinney.id.au> - 2014-11-17 12:23 +1100

#80943 — Re: How modules work in Python

FromBen Finney <ben+python@benfinney.id.au>
Date2014-11-17 12:23 +1100
SubjectRe: How modules work in Python
Message-ID<mailman.15932.1416187505.18130.python-list@python.org>
Abdul Abdul <abdul.sw84@gmail.com> writes:

> Thanks for your nice explanation. For your answer on one of my
> questions:

(Please use “interleaved” posting style, for showing quoted material and
your responses <URL:https://en.wikipedia.org/wiki/Posting_style#Interleaved_style>.)

> * Modules don't have methods. open is an ordinary function in the module.*
>
> Isn't "method" and "function" used interchangeably?

No (or more accurately: if someone does use those interchangeably,
they're not correctly describing Python).

A method is always a function, but a function is not always a method.

A method is a function bound to a specific object instance.

-- 
 \      “As soon as we abandon our own reason, and are content to rely |
  `\       upon authority, there is no end to our troubles.” —Bertrand |
_o__)                                Russell, _Unpopular Essays_, 1950 |
Ben Finney

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web