"case classes":
http://scala.epfl.ch/intro/caseclasses.html
I do think that gimmicks, syntax permutations and refusals of so called
"Python warts" are not sufficient to preserve language attraction in a
competing field that tries to make fast progress.
Kay
--
http://mail.python.org/mailman/listinfo/python-list
uido once stated that
the generator way of doing things is Pythons future it was also a
renouncement of lambda. Compared with this ideological orientation the
introduction of the @-syntax is a minor sacrilege on syntax esthetics -
though this special character may hurd the souls of the believers more
that everything else introduced into the language.
Kay
--
http://mail.python.org/mailman/listinfo/python-list
else:
setattr(obj,name,value)
return property(get,set,None)
Now an example:
class X(object):
a = accessor("a")
b = accessor("b", types = (tuple,list))
c = accessor("c", check = lambda x:hasattr(x,"__len__"))
a,b,c a
g an ad-hoc
typechecker which means that there is really a need and Guido is right
in proposing some "type guards" allthough this hurts again a lot of
souls as we can observe in this thread too. His current suggestions are
either too restricted for each of the peoples requirements (
isinstance-typechecking, duck-typechecking, adaption ) or it is overly
permissive and is in danger to mean everything and nothing. Not to
speak about performance gains doing typechecks at runtime :-(
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
ation comes from the convenience to concatenate strings in this
manner in other languages and has spreaded into the domain of lists and
tuples in Python.
On the other hand i find Mathematicas list operators very appealing:
In =: [1,2,3]^2
Out=: [1,4,9]
Compared with this suggar the list comprehension [x
t;
> Any Ideas?
def seq(n,cls,*args,**kw):
"create a sequence of n objects of type cls."
return [cls(*args,**kw) for i in range(n)]
>>> a,b,c = seq(3,anyclass)
>>> a.shutdown()
>>> b.update()
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
g the clarity of a
very fundamental data structure for speedup rather arbitrary
accumulations seems to be a bad idea. I would move this stuff in a
subclass.
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
gt; > accumulations seems to be a bad idea. I would move this stuff in a
> > subclass.
> >
> > Regards Kay
> +1 on this. The new suggested operations are meaningful for a subset
of all
> valid dicts, so they
> should not be part of the base dict API. If any version
*pling* !
I'm sometimes a bit slow :)
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
l types should be envisioned not some ad hoc solutions
that go deprecated two Python releases later.
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
Personally I could live with that, but the diagram is a bit special
because of the restriction of the = operation. I do not know if PHP
supports this operational view by enabling iterations: $a, $$a, $$$a
... ?
After all I can also live without that in Python...
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
may be anachronistic but I did not
found much explanation, why rexec and bastion are swiss cheese? It may
be helpfull to resume the problems to learn from them.
Ciao
Kay
--
http://mail.python.org/mailman/listinfo/python-list
> is google down today?
>
> http://www.amk.ca/python/howto/rexec/rexec.html
No, I'm down today ;)
Thx.
Kay
--
http://mail.python.org/mailman/listinfo/python-list
t would be nice also to refuse the redundant naming a = defprop("a")
and write
a = defprop() instead. But it's actually not possible at the moment (
or only with deep introspection ).
Session on:
>>> x = X()
>>> x.d
0
>>> xx = XX()
>>> xx.d
0
>>> xx.d = -1
>>> xx.d
1
Ciao
Kay
--
http://mail.python.org/mailman/listinfo/python-list
Matteo Dell'Amico wrote:
> Kay Schluehr wrote:
>
> > Why do You set
> >
> > d.defaultValue(0)
> > d.defaultValue(function=list)
> >
> > but not
> >
> > d.defaultValue(0)
> > d.defaultValue([])
> >
> > ?
>
> I think
yperplane
) and enable to switch between different paddings. This solution is
both flexible and reusable.
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
ambda:
[x*y-z for ((x,a=0),y,z=0) in (1,2,3), (4,5), (6,7,8)]
should also be possible from an operational perspective.
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
If the action of (x,y,z=0) on a tuple is regarded as a function call
why not letting resolve it by the compiler in an appropriate manner?
The tuple assignment is just a special case of this and can be resolved
in a different way. There would be no slowdown at all.
Regards Kay
--
http://mai
idea:
Mappings like that:
((x,y),z) -> x+y-z
((x,y=0),z) -> None
should be valid actions too.
What is the audience thinking about that?
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
idea:
Mappings like that:
((x,y),z) -> x+y-z
((x,y=0),z) -> None
should be valid actions too.
What is the audience thinking about that?
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
)
Maybe Guidos aversion against FP is bit misguided too because it is
actually in
the language but hidden as special rules.
Regards Kay
--
http://mail.python.org/mailman/listinfo/python-list
ithin a Python dict.
If a variable is created as a global it will be stored using the
STORE_NAME opcode instead:
case STORE_NAME:
w = GETITEM(names, oparg);
v = POP();
if ((x = f->f_locals) != NULL) {
if (PyDict_CheckExact(x))
err = PyDict_SetItem(x, w, v);
pass to setattr as first argument?
>
> Thanks a lot for your time.
> Marco.
???
Why don't You create 'name' and 'value' as module scoped variables just
by defining them?
If You want to introspect the module within the module, just define
# defined within spam
d
except NameError: print "Before makeVars: NameError"
else: print "Before makeVars: Not NameError"
makeVars(b=2)
try: b
except NameError: print "After makeVars: NameError"
else: print "After makeVars: Not NameError"
inner
Ron wrote:
> On Wed, 23 Mar 2005 06:21:30 +0100, Kay Schluehr <[EMAIL PROTECTED]>
> wrote:
>
> >I think my proposal was more in mind of Rons modified exec than
> >Pythons lambda.
> >
> >When George proposed his unpacking behavoir for list-comps as a pack
of
&
Ron_Adam wrote:
> On 24 Mar 2005 01:58:48 -0800, "Kay Schluehr" <[EMAIL PROTECTED]>
> wrote:
>
> >I personally don't like using exec and eval for stuff different from
> >evaluating user input.
>
> I lean the other way. I never want to use user imp
could think about introduction of a new assignment ":=" that is
connected to the __assign__ method of custom classes if available.
What do You think?
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
could think about introduction of a new assignment ":=" that is
connected to the __assign__ method of custom classes if available.
What do You think?
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
+ _.b
a+b
Regarding that an object oriented CAS will mix an arbitray number of
algebras/namespaces that use algebraic operators homogenously
referencing namespaces is a reasonable for providing clarity.
A helpfull suggestion. Thanks Bengt!
Regards,
Kay
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
ythons config.c file You can determine which ext-modules will be
compiled into the core. I estimate that a lean core would have a size
around ~600kb. Trimming down further may become hard because You may
have to decide what to sacrifice: tuples, classes or objects ;)
Regards,
Kay
--
http://mai
5623730951
>>> float2ratio(math.sqrt(2))
1393/985
>>> 1393./985
1.4142131979695431
^
>>> float2ratio(math.sqrt(2),10**-10)
275807/195025
>>> 275807./195025
1.4142135623637995
^
>>> math.pi
3.1415926535897931
>>> floa
),'mul_dec')
def mul(m1,m2):
def default(m1,m2):
return "default",1+m1*m2
def mul_dec(m1,m2):
return "mul_dec",Decimal(str(m1))*Decimal(str(m2))
def mul_float(m1,m2):
return "mul_float",m1*m2
return (default,mul_dec,mul_float)
Can You imagine how "case" works internally?
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
-
and postprocessing the pattern has only limited use and worse it
suggests a misnomer: it obscures the semantics that is clearly
functional/OO not procedural.
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
or(1,2)
def f():pass
>>> f
3
This is perfectly valid allthough not very usefull ;)
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
allegoric
meaning of the decorator
def deco(f):
pass
would be: f is "vanishing under decoration" - all is vanity.
In the example deco would be both a decorator and a decoration. In
other examples deco were a decorator and deco(x,y) the decoration.
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
allegoric
meaning of the decorator
def deco(f):
pass
would be: f is "vanishing under decoration" - all is vanity.
In the example deco would be both a decorator and a decoration. In
other cases deco were a decorator and deco(x,y) the decoration.
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
)
[, ]
>>> cg.classes["C"].__subclasses__()
[]
>>> cg.classes["D"].__subclasses__()
[, ]
>>> cg.classes["F"].__subclasses__()
[]
>>> cg.classes["G"].__subclasses__()
[]
>>> cg.classes["H"].__subclasses__()
[]
>>> cg.classes["I"].__subclasses__()
[]
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
module. Different
people seem to share similar ideas and claim about inconveniencies. I
use the path-module by myself for a year. This indicates that there is
something wrong or missing in the std-library.
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
ld have a great overall impact on the std-lib.
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
oth the slow javaesque W3C-DOM parser implementation and the
statemachine oriented SAX. But has this module some place in the
standard-lib. No, because it promotes double implementation i.e. not
only one way to do it. And throwing away old stuff is impossible
because downwards incompatibilities.
Fredrik Lundh wrote:
> Kay Schluehr wrote:
>
> > You have already given the arguments in Your discussion above. I
> > personally never use the standard-lib XML parser, but pyRXP/pyRXPU
> > which is fast, stores objects in pythonic list/tuple/dict
structures
> > and p
Fredrik Lundh wrote:
> here are three alternatives:
>
> ltree (http://codespeak.net/lxml/)
> libxml2 (http://xmlsoft.org/downloads.html)
> celementtree (http://effbot.org/zone/celementtree.htm)
Thanks, Fredrik, I will take a look.
Ciao,
Kay
--
http://mail.pyt
haslocal:
yield co.co_varnames[oparg]
elif op in hascompare:
yield cmp_op[oparg]
elif op in hasfree:
if free is None:
free = co.co_cellvars + co.co_freevars
yield free[oparg]
>>> list(distrace
Terry Reedy wrote:
> "Kay Schluehr" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > class A(object):
> >def __init__(self):
> >raise NotImplemented
> >
> > We can regard class A as a "pure abstract" cla
n. I thinks the place for such
ideas are Michael Hudsons famous bytecodehacks.
-1 for from me for thunks in Python.
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
def get_x():
return self.__x
def set_x(value):
self.__x = value
del_x = None
doc = "I'm the 'x' property."
- as func(*args,**kw):
Anoymus functions. Replacement for lambda. Support for
arbirtra
examples below we can identifiy the expression belonging to f
without ambiguities and restrictions.
f(y=0,..)
.. x = 1
if f(y=2,..) == 1:
.. x = 5
def g(a):
a**2-1
return 8
Note that the colon after f has vanished as expected for a call.
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
ifiers. Introducing '::'
would make the "folding definitions into dict" operation visible that
takes place in the machinery of the VM. Very Pythonic IMHO :-)
+1 from me for '::' and 'where'.
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
roperty." )
This statement would not work if the result of '::' ( considered as an
"ordered dict" ) would return simply a dict because the order of the
input parameters matters.
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
ncies. This is the reason why those
macros are harmfull and should be abandoned from high level languages (
using them in C is reasonable because code expansion can be time
efficient and it is also a way to deal with parametric polymorphism but
Python won't benefit from either of this issues ).
;x' property."
Nest suites:
x = property(*args) where args:
t = tuple(*t) where t:
def fget(self):
return self.__x
fset = None
fdel = None
doc = "I'm the 'x' property."
Evaluate conditions:
sefull
little wrapper I found eventually on the "Vaults of Parnassus" which is
called reverb.py
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
Bengt Richter wrote:
> On 17 Apr 2005 09:27:34 -0700, "Kay Schluehr" <[EMAIL PROTECTED]>
wrote:
>
> >> Exactly. Except the above example is from the day-old-bread
> >items-tuple-returning version of :: ;-)
> >> And with an ordered dict subtype th
return self.__x
because there is no rule to match doc and fget onto a and b. In this
case we would need specifiers:
x = property(a, b)
where **a:
doc = "I'm the 'x' property."
where **b:
def fget(self):
return self.__x
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
my last proposal I finally distilled from our discussion
would pretty much fullfill all three requirements whereas that of
Andrey Tatarinov would be somewhat more restrictive and fullfills only
the first two.
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
main
object. Since each expression is an object You can drop "object" from
C-like definitions
object x = 8
and reduce it to
x = 8
To become more precise You have to do workarounds.
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
ocals(self, func,*args,**kw):
sys.settrace(self.trace_returns)
func(*args,**kw)
sys.settrace(None)
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
turn self.dispatch_call(frame, arg)
if event == 'return':
return self.dispatch_return(frame, arg)
if event == 'exception':
return self.dispatch_exception(frame, arg)
print 'bdb.Bdb.dispatch: unknown debugging event:', `event`
return self.trace_dispatch
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
had not yet the time to analyze the output of the following function
but it returns stable values:
def gettracefunc():
import sys
i = 0
while 1:
try:
f_trace = sys._getframe(i).f_trace
if f_trace:
return f_trace
i+=1
except ValueError:
break
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
istian Tismer is important:
http://mail.python.org/pipermail/python-announce-list/2004-July/003280.html
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
Seems You are looking for a generating function of a recurrence
relation. There is a standard text about this topic written by Herbert
S. Wilf downloadable from his homapage:
http://www.cis.upenn.edu/~wilf/
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
I was younger I found anarchy cool. Now I find it grey.
Ciao,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Zachmann wrote:
> I understand the Wikipedia article on Polymorphism
> ( http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 )
> that it doesn't make sense to talk about polymorphism in a fully dynamically
> typed language -- does the Python community agree?
Maybe you should a
7;t see why your typeclass illustration does not apply to ABCs as
well? The sanity checks for typeclasses you describe seem to be a
particular feature of Haskell or other pure functional languages
without destructive updates and messy aliasing problems. It's hardly
believable that this would be possible in Python and runtime checks
won't help much in this case.
By the way I also don't understand Guidos concerns. Maybe he is against
the whole idea of creating frameworks and partial implementations? It's
not very clear for what reasons he likes interfaces.
Kay
--
http://mail.python.org/mailman/listinfo/python-list
tion. It wouldn't be
a Zen aspect if there is not the language itself is speeking. In the
end everything is open to interpretation, but interpretation is itself
a "glue code".
But why unique? I don't know. Maybe because there are only three
numbers: one, two and many. Perl is ma
he checker can guarantee
detection of a few obvious cycles where dependencies can be tracked
also syntactically, at least in principle like in your example, what
exactly is ensured by the checker and how can the definition of a
typeclass be adapted accordingly?
Kay
--
http://mail.python.org/mailman/listinfo/python-list
eclecticism can be done right.
Kay
--
http://mail.python.org/mailman/listinfo/python-list
m/try_python/python.sbox?%201+2
etc.
The interesting issue is the provided link. Copying the HTML output
into a file and executing it opens a file transfer connection. The
result is as expected:
python.sbox
It contains the correct result: it is 3 :)
Kay
--
http://mail.python.org/mailman/listinfo/python-list
D H wrote:
> Kay Schluehr wrote:
> > [EMAIL PROTECTED] wrote:
> >
> >>I am trying to learn GUI programming in Python, but have to confess I
> >>am finding it difficult.
> >
> >
> > Don't do it if you can prevent it.
>
> What kind o
Steven D'Aprano wrote:
> On Fri, 30 Dec 2005 20:00:51 -0500, Mike Meyer wrote:
>
>
> >> The other way I thought of is to create a separate class that consists
> >> of the variables and to use the
> >>
> >> from import *
> >>
> >> in all of the files (namespaces) where it is needed.
> >
> > Except
rrespondences between
parts of the whole pattern. The aspects in an AOP program are the
implicite order of a program that is weaved by aspects. The spiritual
meaning is that of the gnostic believe in a transcentendal order that
pervades existing being but is nevertheless hidden. Its relationship is
less close to time as it is to space. The implicate order is of course
state- and timeless.
Kay
--
http://mail.python.org/mailman/listinfo/python-list
e till the
end of time only because IP needs them. Is that what the Python
community really wants?
Kay
--
http://mail.python.org/mailman/listinfo/python-list
Max M wrote:
> First of they would need to make Python a strategic platform for
> corporations, so that it was used practically everywhere on Windows.
>
> Then it would have the powerbase to change the lanuage and make an
> incompatible version that they could control.
>
> As far as I can see C##
actually believe in one single best solution. It's more a symbolic
action of bundling forces and attention.
Kay
--
http://mail.python.org/mailman/listinfo/python-list
ts should be combined to the next 600
Python webframeworks but that there is a clear recommendation in
particular for beginners in Python. By the way I would also bundle
SQLite although it is not the most fancy DB. It is sufficient for small
apps, easy to handle and easy to describe. I
x a
new instance of L is needed so that we actually have a function:
L = lambda x: [a1, [a2, [[aN, [x]]...]]
I'm seeking for an efficient implementation that does not recompute the
whole list each time. Any ideas?
Kay
--
http://mail.python.org/mailman/listinfo/python-list
Paul Boddie wrote:
> Adrian Holovaty wrote:
> > Fuzzyman wrote:
> > > web.py has the great advantage that (allegedly) you can migrate apps
> > > from CGI to FastCGI, mod_python, WSGI.
> >
> > This isn't an advantage of web.py over other frameworks. You can do the
> > same thing with Django, becaus
s at most a warning caused by possible rounding
errors of float.
Instead of dealing with awkward wrappers, I wonder if literals
currently interpreted as floats could not be interpreted as Decimal
objects in future?
Kay
--
http://mail.python.org/mailman/listinfo/python-list
a big obstacle. With the current implementation the
compiler has to generate a decimal object from a NUMBER token instead
of a float object. The context of a calculation is still the decimal
module object and it's attributes. Why should it be changed?
Kay
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten wrote:
> Kay Schluehr wrote:
>
> > I want to manipulate a deeply nested list in a generic way at a
> > determined place. Given a sequence of constant objects a1, a2, ..., aN
> > and a variable x. Now construct a list from them recursively:
> >
restricted subset of Python ( called RPython )
to translate type annotated RPython flowgraphs to several backends
including Java. Therefore it seems not necessary to write a new Jython
compiler or CPython runtime. JVMs are all around also for ARM
processors.
Kay
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
> On 2006-01-19, Kay Schluehr <[EMAIL PROTECTED]> wrote:
>
> >> Does anybody have advice? I am looking for any tricks, features I can
> >> disable, etc so I can get the python core to be a small as possible (<100k
> >> would be goo
Bengt Richter wrote:
> On 19 Jan 2006 01:19:06 -0800, "Kay Schluehr" <[EMAIL PROTECTED]> wrote:
>
> >I want to manipulate a deeply nested list in a generic way at a
> >determined place. Given a sequence of constant objects a1, a2, ..., aN
> >and a va
the time, does it really help
> to point out that the float representing 0.100...01 is an exact rational
> -- especially without mentioning that it happens to be the *wrong* exact
> rational?
I concur and I wonder why CAS like e.g. Maple that represent floating
point numbers using two in
Tim Peters wrote:
> [Kay Schluehr]
> > I concur and I wonder why CAS like e.g. Maple that represent floating
> > point numbers using two integers [1] are neither awkward to use nor
> > inefficient.
>
> My guess is that it's because you never timed the difference in
objects of equal size. It could be
extended to distribute(*args[,default]) by a single default argument
that is inserted in the distribution table when two listlike objects
have not the same size.
Kay
--
http://mail.python.org/mailman/listinfo/python-list
Sanjay wrote:
> Hi All,
>
> Not being able to figure out how are partial classes coded in Python.
>
> Example: Suppose I have a code generator which generates part of a
> business class, where as the custome part is to be written by me. In
> ruby (or C#), I divide the code into two source files. L
Bruno Desthuilliers wrote:
> Sanjay wrote:
> > Hi Alex,
> >
> > Thanks for the input.
> >
> > Being new to Python, and after having selected Python in comparison to
> > ruby (Turbogears vs Rails) , is jerks me a bit. In my openion it should
> > be an obvious and easy to implement feature and must
[EMAIL PROTECTED] wrote:
> Sanjay wrote:
> > Hi All,
> >
> > Not being able to figure out how are partial classes coded in Python.
> >
> > Example: Suppose I have a code generator which generates part of a
> > business class, where as the custome part is to be written by me. In
> > ruby (or C#), I
John Salerno wrote:
> Marc 'BlackJack' Rintsch wrote:
>
> > Can you flesh out your use case a little bit and tell why you can't solve
> > the problem with inheritance or a meta class?
>
> From my experience with C#, the only real use for partial classes is
> when you want to separate your GUI cod
Ray wrote:
> David Cook wrote:
> > On 2006-07-24, Sybren Stuvel <[EMAIL PROTECTED]> wrote:
> >
> > > Jython isn't up to par with current Python versions either.
> >
> > But the last release is up to the level of C-Python 2.2 or so. I don't
> > really feel like I'm missing that much with it.
>
> Yo
Ray wrote:
> > But you can't compile a Python module into a dotNet library that is
> > used from C# which is the very essence of the CLR. IronPython is not
> > more usefull than PythonNet.
>
> At least for my case I will use IronPython for higher level task, and
> perhaps calls libraries written i
Jaroslaw Zabiello wrote:
> Of course, I you like, you can freeze every object you want and nobody can
> be able to open and change it. You can also trace all activity for changing
> something to objects because Ruby has nice system hooks implemented. Ruby
> has nice security system (private, prote
Bruno Desthuilliers wrote:
> >>Care to write an external DSL in Ruby ?
>
> I mean : write a parser and interpreter for a DSL. In Ruby.
It is this kind of stuff Rubys talk about when they mention "DSLs in
Ruby":
http://www.artima.com/rubycs/articles/ruby_as_dsl.html
--
http://mail.python.org/m
" attributes have to be declared explicitely:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496920
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
A new recipe for attribute protection which is aligned with Pythons
convention of privacy indication using underscore name mangling.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496930
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
Tomi Lindberg wrote:
> Hi,
>
> With the following function definition, is it possible to
> create an instance of class C outside the function f (and if
> it is, how)?
def f():
class C(object):
def __init__(self):
self.a = 'a'
f.C = C
return C()
>>> f.C
>
Diez B. Roggisch wrote:
> Kay Schluehr wrote:
>
> >
> > Tomi Lindberg wrote:
> >> Hi,
> >>
> >> With the following function definition, is it possible to
> >> create an instance of class C outside the function f (and if
> >> it is,
steve wrote:
> I mean Aspect-Oriented Programming.
> If any please give me some of links.
> Thanks a lot.
http://www.google.de/search?hl=de&q=python+%2B+AOP&btnG=Google-Suche&meta=
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > The current beta version of Python is 2.5 . How can a Python programmer
> > minimize the number of changes that will be needed to run his code in
> > Python 3000?
>
> by ignoring it, until it exists.
>
>
And why not ignoring it, when it come
101 - 200 of 732 matches
Mail list logo