[Tutor] Re: Re: Newbie OOP Question.(diff between function, module and class)

Derrick 'dman' Hudson dman@dman.ddts.net
Mon, 10 Jun 2002 20:54:53 -0500


--LpQ9ahxlCli8rRTG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jun 10, 2002 at 04:59:48PM -0500, SA wrote:
| On 6/10/02 12:26 PM, "Skip Montanaro" <skip@pobox.com> wrote:

| >   SA> One last question, sorry if this is very basic but I feel these
| >   SA> terms need better definitions for newbies like me (the only other
| >   SA> languages I have experience with are Qbasic and HTML) what is a
| >   SA> namespae? Is that analagous to pwd of the program? For instance, =
if
| >   SA> the program is currently in one are of the script doing work, wou=
ld
| >   SA> that be considered the namespace?
| >=20
| > Yes, it is more or less like the filesystem hierarchy.  In the current
| > directory, a reference to "blue.txt" would reference a file in the curr=
ent
| > directory.  One significant difference is that Python's module/package
| > system doesn't have a syntax for referring to the current module's pare=
nt
| > (no "..").
|
| Ahh. Now that may prove interesting. Would it be beneficial to make a
| reserved command like .. That pops you back into the parent namespace?

import foo
bar  =3D foo
baz  =3D foo
spam =3D foo

What's the parent namespace of module foo?

IOW, no.  Also, using such a feature would also break good module
design.

-D

--=20

Yes, Java is so bulletproofed that to a C programmer it feels like being in=
 a
straightjacket, but it's a really comfy and warm straightjacket, and the wo=
rld
would be a safer place if everyone was straightjacketed most of the time.
                                                      -- Mark 'Kamikaze' Hu=
ghes
=20
GnuPG key : http://dman.ddts.net/~dman/public_key.gpg


--LpQ9ahxlCli8rRTG
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj0FWG0ACgkQO8l8XBKTpRRdYQCgsz8wD+CbrM8hUu7+44di3qKD
Fi0Ani3CVo+T79QsViNoziA1Lh+uFAn6
=7DBz
-----END PGP SIGNATURE-----

--LpQ9ahxlCli8rRTG--