New to the group, this is my first post...
It appears that either absolute imports (or my brain) aren't working.
Given a module string.py which is in the same directory as a.py:
#File a.py
from __future__ import absolute_import
import string
print string # Module imported is string.py in curren
On May 20, 4:18 pm, LittleGrasshopper wrote:
> New to the group, this is my first post...
>
> It appears that either absolute imports (or my brain) aren't working.
> Given a module string.py which is in the same directory as a.py:
>
> #File a.py
> from __future__ import
On May 22, 12:42 am, "Gabriel Genellina"
wrote:
> En Wed, 20 May 2009 20:18:02 -0300, LittleGrasshopper
> escribió:
>
> > New to the group, this is my first post...
>
> > It appears that either absolute imports (or my brain) aren't working.
> >
On May 23, 6:39 pm, "Gabriel Genellina"
wrote:
> En Sat, 23 May 2009 12:32:24 -0300, LittleGrasshopper
> escribió:
>
>
>
> > On May 22, 12:42 am, "Gabriel Genellina"
> > wrote:
> >> En Wed, 20 May 2009 20:18:02 -0300, LittleGrass
With so many choices, I was wondering what editor is the one you
prefer when coding Python, and why. I normally use vi, and just got
into Python, so I am looking for suitable syntax files for it, and
extra utilities. I dabbled with emacs at some point, but couldn't get
through the key bindings for
On May 25, 10:44 am, J Kenneth King wrote:
> LittleGrasshopper writes:
> > With so many choices, I was wondering what editor is the one you
> > prefer when coding Python, and why. I normally use vi, and just got
> > into Python, so I am looking for suitable syntax files
This is probably trivial, but it's driving me mad somehow. All (new
style) classes are instances of 'type' by default, unless a custom
metaclass is specified. I take this to mean that when a class
declaration is found in the code, an instance of 'type' representing
that class is created by calling
On May 28, 4:37 pm, Christian Heimes wrote:
> LittleGrasshopper wrote:
> > This is probably trivial, but it's driving me mad somehow. All (new
> > style) classes are instances of 'type' by default, unless a custom
> > metaclass is specified. I take this to me
On May 28, 4:37 pm, Christian Heimes wrote:
> LittleGrasshopper wrote:
> > This is probably trivial, but it's driving me mad somehow. All (new
> > style) classes are instances of 'type' by default, unless a custom
> > metaclass is specified. I take this to me
On May 28, 11:07 pm, Terry Reedy wrote:
> LittleGrasshopper wrote:
> > On May 28, 4:37 pm, Christian Heimes wrote:
> >> LittleGrasshopper wrote:
> >>> This is probably trivial, but it's driving me mad somehow. All (new
> >>> style) classes are
I am experimenting with metaclasses, trying to figure out how things
are put together. At the moment I am baffled by the output of the
following code:
"""
Output is:
instance of metaclass MyMeta being created
(, )
instance of metaclass MyNewMeta being created
On May 30, 4:01 pm, LittleGrasshopper wrote:
> I am experimenting with metaclasses, trying to figure out how things
> are put together. At the moment I am baffled by the output of the
> following code:
>
>
> """
> Output
On May 30, 6:15 pm, Carl Banks wrote:
> On May 30, 5:32 pm, LittleGrasshopper wrote:
>
>
>
> > On May 30, 4:01 pm, LittleGrasshopper wrote:
>
> > > I am experimenting with metaclasses, trying to figure out how things
> > > are put together. At the m
On May 31, 12:19 am, Arnaud Delobelle wrote:
> LittleGrasshopper writes:
> > On May 30, 6:15 pm, Carl Banks wrote:
> >> On May 30, 5:32 pm, LittleGrasshopper wrote:
>
> >> > On May 30, 4:01 pm, LittleGrasshopper wrote:
>
> >> > > I am exper
On May 31, 9:24 am, LittleGrasshopper wrote:
> On May 31, 12:19 am, Arnaud Delobelle wrote:
>
>
>
> > LittleGrasshopper writes:
> > > On May 30, 6:15 pm, Carl Banks wrote:
> > >> On May 30, 5:32 pm, LittleGrasshopper wrote:
>
> > &
On May 31, 2:03 pm, a...@pythoncraft.com (Aahz) wrote:
> In article
> ,
>
> LittleGrasshopper wrote:
> >> On May 31, 12:19=A0am, Arnaud Delobelle wrote:
>
> >>> [1]http://www.python.org/download/releases/2.2.3/descrintro/
>
> >I'm about 2/3 of
This is some simple code which I got from Guido's paper on the
unification of classes and types, which Arnaud suggested to improve my
knowledge of metaclasses:
class M1(type):
pass
class M2(M1):
pass
class M3(M2):
pass
class C1:
__metaclass__ = M1
class C2(C1):
__metaclass__ =
On May 31, 3:52 pm, LittleGrasshopper wrote:
> This is some simple code which I got from Guido's paper on the
> unification of classes and types, which Arnaud suggested to improve my
> knowledge of metaclasses:
>
> class M1(type):
> pass
> class M2(M1):
> pa
On May 31, 3:59 pm, Carl Banks wrote:
> On May 31, 3:52 pm, LittleGrasshopper wrote:
>
>
>
> > This is some simple code which I got from Guido's paper on the
> > unification of classes and types, which Arnaud suggested to improve my
> > knowledge
On May 31, 4:11 pm, LittleGrasshopper wrote:
> On May 31, 3:59 pm, Carl Banks wrote:
>
>
>
> > On May 31, 3:52 pm, LittleGrasshopper wrote:
>
> > > This is some simple code which I got from Guido's paper on the
> > > unification of classes and
On Jun 1, 12:18 am, Lie Ryan wrote:
> LittleGrasshopper wrote:
> > On May 31, 2:03 pm, a...@pythoncraft.com (Aahz) wrote:
> >> In article
> >> ,
>
> >> LittleGrasshopper wrote:
> >>>> On May 31, 12:19=A0am, Arnaud Delobelle wrote:
&g
On Jun 1, 12:42 am, Michele Simionato
wrote:
> On May 31, 2:32 am, LittleGrasshopper wrote:
>
> > Seriously, metaclasses are making my brain hurt. How do people like
> > Michele Simionato and David Mertz figure these things out? Does it all
> > come to looking at t
On Jun 1, 11:11 am, Michele Simionato
wrote:
> On Jun 1, 7:18 pm, LittleGrasshopper wrote:
>
> > I have to thank you for all the invaluable materials you have provided
> > to the python community. The process that you followed must have been
> > incredibly arduous.
>
On Jun 1, 2:38 am, Piet van Oostrum wrote:
> >>>>> LittleGrasshopper (L) wrote:
> >L> On May 31, 3:59 pm, Carl Banks wrote:
> >>> On May 31, 3:52 pm, LittleGrasshopper wrote:
>
> >>> > This is some simple code which I got from Guid
On Jun 1, 3:44 am, Piet van Oostrum wrote:
> > Piet van Oostrum (I) wrote:
> >I> But your class definition:
> >I> class C3(C1, C2):
> >I> says that C1 should be before C2. Conflict!!
> >I> Change it to class C3(C2, C1):
>
> Of course the C1 is then superfluous.
>
> I wonder why you want this.
25 matches
Mail list logo