Re: How modules work in Python

2014-11-20 Thread Michael Torrie
On 11/19/2014 02:50 PM, Chris Angelico wrote: > On Thu, Nov 20, 2014 at 6:00 AM, wrote: >> I only started reading this list about a month ago, and from what I've seen, >> being pedantic is pretty much par for the course. > > Usually in a good way. :) And often for good reason. -- https://mail

Re: How modules work in Python

2014-11-19 Thread Chris Angelico
On Thu, Nov 20, 2014 at 6:00 AM, wrote: > I only started reading this list about a month ago, and from what I've seen, > being pedantic is pretty much par for the course. Usually in a good way. :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: How modules work in Python

2014-11-19 Thread sohcahtoa82
On Tuesday, November 18, 2014 11:44:53 PM UTC-8, Larry Hudson wrote: > On 11/18/2014 12:59 PM, sohcah...@gmail.com wrote: > > On Tuesday, November 18, 2014 12:14:15 AM UTC-8, Larry Hudson wrote: > >> First, I'll repeat everybody else: DON'T TOP POST!!! > >> > >> On 11/16/2014 04:41 PM, Abdul Abdul

Re: How modules work in Python

2014-11-19 Thread Steven D'Aprano
Larry Hudson wrote: > Your example may look the same (it uses the same dot syntax), but here it > is to resolve a namespace -- a module is not an object.  So yes, this is > still a function and not a method.  But we're getting rather pedantic > here. But not pedantic enough. Modules are, in fact

Re: How modules work in Python

2014-11-18 Thread Larry Hudson
On 11/18/2014 12:59 PM, sohcahto...@gmail.com wrote: On Tuesday, November 18, 2014 12:14:15 AM UTC-8, Larry Hudson wrote: First, I'll repeat everybody else: DON'T TOP POST!!! On 11/16/2014 04:41 PM, Abdul Abdul wrote: Dave, Thanks for your nice explanation. For your answer on one of my quest

Re: How modules work in Python

2014-11-18 Thread sohcahtoa82
On Tuesday, November 18, 2014 12:14:15 AM UTC-8, Larry Hudson wrote: > First, I'll repeat everybody else: DON'T TOP POST!!! > > On 11/16/2014 04:41 PM, Abdul Abdul wrote: > > Dave, > > > > Thanks for your nice explanation. For your answer on one of my questions: > > > > *Modules don't have method

Re: How modules work in Python

2014-11-18 Thread Larry Hudson
First, I'll repeat everybody else: DON'T TOP POST!!! On 11/16/2014 04:41 PM, Abdul Abdul wrote: Dave, Thanks for your nice explanation. For your answer on one of my questions: *Modules don't have methods. open is an ordinary function in the module.* Isn't "method" and "function" used interch

Re: How modules work in Python

2014-11-16 Thread Dave Angel
(Please don't top-post. Use interleaved posting. And remove parts you didn't respond to.) (While I'm criticizing, I should point out that your quoting seems doublespaced. That makes me suspect buggy googlegroups. If you're using that, you should either find a real newsreader, use the maili

Re: How modules work in Python

2014-11-16 Thread Ben Finney
Abdul Abdul 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 https://en.wikipedia.org/wiki/Posting_style#Interleaved_style>.) > * Modules don't have methods. open is an

Re: How modules work in Python

2014-11-16 Thread Abdul Abdul
Dave, Thanks for your nice explanation. For your answer on one of my questions: * Modules don't have methods. open is an ordinary function in the module.* Isn't "method" and "function" used interchangeably? In other words, aren't they the same thing? Or, Python has some naming conventions here?

Re: How modules work in Python

2014-11-16 Thread Steven D'Aprano
Abdul Abdul wrote: > Hello, > > I'm new to Python, and just have a small question, and thought you might > have an idea on it. > > I came across the following example that uses the Python Imaging Library > (PIL): > > from PIL import Image > img = Image.open('xyz.jpg') > > I know that PIL is a

Re: How modules work in Python

2014-11-16 Thread Ian Kelly
On Sun, Nov 16, 2014 at 12:36 PM, Abdul Abdul wrote: > My question is, where did PIL go here? Can a module have another module > inside it? Yes, a module that contains other modules is usually called a package. -- https://mail.python.org/mailman/listinfo/python-list

Re: How modules work in Python

2014-11-16 Thread Joel Goldstick
On Sun, Nov 16, 2014 at 2:36 PM, Abdul Abdul wrote: > Hello, > > I'm new to Python, and just have a small question, and thought you might > have an idea on it. > > I came across the following example that uses the Python Imaging Library > (PIL): > > from PIL import Image > img = Image.open('xyz.jp

How modules work in Python

2014-11-16 Thread Abdul Abdul
Hello, I'm new to Python, and just have a small question, and thought you might have an idea on it. I came across the following example that uses the Python Imaging Library (PIL): from PIL import Image img = Image.open('xyz.jpg') I know that PIL is a module. And, I think that Image is also a mo