Re: Nimrod programming language

2009-05-09 Thread kay
On 8 Mai, 17:48, Andreas Rumpf wrote: > Dear Python-users, > > I invented a new programming language called "Nimrod" that combines Python's > readability with C's performance. Please check it out:http://force7.de/nimrod/ > Any feedback is appreciated. > > Regards, > Andreas Rumpf > >

Re: php to python code converter

2009-05-10 Thread kay
rror exceptions. Same arguments apply to Javascript. Not sure about Ruby but I do think a parser is feasible despite context sensitivities. Ruby is not my concern though. Personally I'd be interested in Wordpress which I like and use. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Nimrod programming language

2009-05-11 Thread kay
On 12 Mai, 02:10, Tomasz Rola wrote: > On Mon, 11 May 2009, rump...@web.de wrote: > > > One question I ask myself upon seeing a new language is if it is possible > > > to program amb (amb=ambiguous) operator in it. This page gives a very > > > nice, "code first" explanation of amb and how it is su

Re: Parsing Strings in Enclosed in Curly Braces

2009-05-15 Thread kay
On 15 Mai, 18:12, xama...@yahoo.com wrote: > How do you parse a string enclosed in Curly Braces? > > For instance: > > x = "{ABC EFG IJK LMN OPQ}" > > I want to do x.split('{} ') and it does not work. Why does it not work > and what are EXCEPTIONS to using the split method? > > That I want to split

issue

2019-07-10 Thread joshua kay
i was made aware by the python installer about the support team, please tell me a solution for my issue thank you, Joshua kay -- https://mail.python.org/mailman/listinfo/python-list

Re: Parametric Polymorphism

2005-09-26 Thread Kay Schluehr
quite close to the Lisp/CLOS > implementation of methods. Guido himself addressed multimethods in his Artima blog: http://www.artima.com/weblogs/viewpost.jsp?thread=101605 See also the subsequent discussion about subtyping problems. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Will python never intend to support private, protected and public?

2005-09-28 Thread Kay Schluehr
ch ones should be at least publicly accessible within a class hierarchy. This helps structuring code in the large and spotting attention. Code becomes easier accessible. But if we have Sunday or I get asked by serious programmers I also know the right technical answers about protection rights, security etc. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Moronicity Xha Lee, Jargonizer

2005-09-29 Thread Kay Schluehr
> trolls." > > > Raymond People like very much responding on offense. But they seem not to like liking that. By the way I noticed also a few reasonable non-troll postings of Xah without any response in the forum. Not even Xahs posting strategy is coherent. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-08 Thread Kay Schluehr
Alex Martelli wrote: > try it (and read the Timbot's article included in Python's sources, and the > sources themselves)... Just a reading advise. The translated PyPy source pypy/objectspace/listsort.py might be more accessible than the corresponding C code. Kay -- http:/

Re: How to delete yourself????

2005-10-14 Thread Kay Schluehr
to me at all. Why is it not sufficient to call child.parent.remove(child) if the caller holds a child object but not the parent? Otherwise it should be sufficient to call parent.remove(child). Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: object inheritance and default values

2005-10-14 Thread Kay Schluehr
jects while those Shape objects are factory functions of other Shape objects by means of __call__: def shape(**kwds): class Shape(object): def __init__(self,**kwds): self.__dict__.update(kwds) def __call__(self, **kwds): new = self.__class__(**self.__dict__) new.__dict__.update(kwds) return new return Shape(**kwds) Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: can a cut-down Python still be Python?

2005-10-17 Thread Kay Schluehr
The Eternal Squire wrote: > My main question regarding this is: even if I am successful, would the > results be rejected out of hand by y'all as not meeting the Zen of > Python? Have you ever asked a Zen master about Zen? Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: override a property

2005-10-18 Thread Kay Schluehr
Robin Becker wrote: > Is there a way to override a data property in the instance? Do I need to > create > another class with the property changed? > -- > Robin Becker It is possible to decorate a method in a way that it seems like property() respects overridden methods. The decorator cares polymo

Re: override a property

2005-10-20 Thread Kay Schluehr
olymorphism of Pythons properties than by stating it as a pleonasm about the used get and set methods. This way a property don't ever have to be redefined in subclasses if get_x, set_x etc. are changed. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: override a property

2005-10-22 Thread Kay Schluehr
Robin Becker wrote: > Kay Schluehr wrote: > > Robin Becker wrote: > > > > > >>I thought that methods were always overridable. > >>In this case the lookup on the > >>class changes the behaviour of the one and only property. > > > >

wxListbook layout problem

2005-10-25 Thread Kay Schluehr
say the least. Has anyone of the GUI specialists an idea how to fix this? Kay PS. I tried this on WinXP only. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread Kay Schluehr
ttitudes of my co-workers towards learning a new language. It just changed my status as a programmer inside of the department. And remember: Python is still cutting edge as a language but sub-standard when it comes to tool support i.e. you do not have to introduce just a language but a different

Re: how to present Python's OO feature in design?

2005-11-06 Thread Kay Schluehr
hat it is NOT Pythons non-declarativeness but it's dynamicity that makes it hard to picture it's design. Classes in Python are cheap, object structures are even cheaper. That's why UML hardly provides an adequate representation of Python programs and Pythonistas usually don't care a l

Re: Proposal for adding symbols within Python

2005-11-17 Thread Kay Schluehr
$close, ... are $ymbols. > > How about using the prefix "symbol." instead of "$"? > > >>> symbol.x I recognize 3 symbols: a "symbol" a dot and another symbol. So I wouldn't call this a symbol. Maybe a "diabolon"? Other languages have symbols, Python has diaboli ;) Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are there no ordered dictionaries?

2005-11-21 Thread Kay Schluehr
nested list. An "ordered dict" would lower the impedance between a dict and a list. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are there no ordered dictionaries?

2005-11-22 Thread Kay Schluehr
ice place and a nice interface the Cheese Shop has the appeal of a code slum. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are there no ordered dictionaries?

2005-11-22 Thread Kay Schluehr
A.M. Kuchling wrote: > On 22 Nov 2005 01:41:44 -0800, > Kay Schluehr <[EMAIL PROTECTED]> wrote: > > Does anyone actually use this site? While the Vaults offered a nice > > place and a nice interface the Cheese Shop has the appeal of a code > > slum. > &g

Re: Application Plugin Framework

2005-11-22 Thread Kay Schluehr
directories of sys.path. The solution is referencing work.py relative to the dir of the PluginManager. MyFramework/ __init__.py PluginManager.py Plugins/ plugin.py work.py ### plugin.py ### import MyFramework.Plugins.work as work # do some stuff... If import still causes trouble add the path of MyFramework to sys.path. Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are there no ordered dictionaries?

2005-11-22 Thread Kay Schluehr
#x27;a':2)] and maybe d['a'] => [1, 2] ??? As far as I understand the requirement an odict provides the same interface as a dict. The only difference is a certain order of the keys that is induced by operations on a dict and cannot be established by properties of the keys (

Re: Why are there no ordered dictionaries?

2005-11-23 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > Steve Holden wrote: > > Perhaps now the answer top your question is more obvious: there is by no > > means universal agreement on what an "ordered dictionary" should do. > > Given the ease with which Python allows you to implement your chosen > > functionality it would b

Re: user-defined operators: a very modest proposal

2005-11-23 Thread Kay Schluehr
efined operators but it seems to be dead. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-27 Thread Kay Schluehr
[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. GUI - toolkits are very complex beasts and at least to me a source of pain far more as a joy. Python cannot help you making them signific

Re: python speed

2005-11-30 Thread Kay Schluehr
Harald Armin Massa wrote: > Dr. Armin Rigo has some mathematical proof, that High Level Languages > like esp. Python are able to be faster than low level code like > Fortran, C or assembly. > > I am not wise enough to understand that proof. > > Maybe I understood those papers totally wrong and he

Python package installing rationale

2005-12-03 Thread Kay Schluehr
In almost any case I install a Python package via distutils some directories in the package tree are left behind e.g. the docs, licenses, tests etc. I wonder if there is some rationale behind this? Should it be left to the "creative freedom" of the user to copy the docs whereever she wants or is th

Re: Lisp development with macros faster than Python development?..

2005-07-08 Thread Kay Schluehr
border of the language and an application should be somehow fixed to enable those. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: f*cking re module

2005-07-08 Thread Kay Schluehr
as not the first one who considered his mental weakness/aesthetic repulsion as a virtue: http://home.earthlink.net/~jasonrandharper/reverb.py I never took time for a critical review. The module just worked for my purposes. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: removing list comprehensions in Python 3.0

2005-07-08 Thread Kay Schluehr
e never trusted to implement waiting for the right syntax sugar. More than this round braces together with lists can be considered as a concession to the LISP programmer who was repelled from Python by the decision to eliminate functional programming features. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: removing list comprehensions in Python 3.0

2005-07-08 Thread Kay Schluehr
Leif K-Brooks schrieb: > Kay Schluehr wrote: > > Well, I want to offer a more radical proposal: why not free squared > > braces from the burden of representing lists at all? It should be > > sufficient to write > > > >>>>list() > > > >

Re: removing list comprehensions in Python 3.0

2005-07-08 Thread Kay Schluehr
Leif K-Brooks schrieb: > Kay Schluehr wrote: > >>>>list.from_str("abc") > > > > list("a", "b", "c" ) > > > I assume we'll also have list.from_list, list.from_tuple, > list.from_genexp, list.from_xrange, etc.? O

Re: Lisp development with macros faster than Python development?..

2005-07-09 Thread Kay Schluehr
Kirk Job Sluder schrieb: > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > > This might be a great self experience for some "great hackers" but just > > annoying for others who used to work with modular standard librarys and > > think that the b

Hosting Python projects

2005-07-09 Thread Kay Schluehr
something like that. Is this a good forum > for exposing modules to the public, or is there somewhere > more-acceptable? Does this newsgroup find attachments acceptable? > > -- > Jacob One side-question: has anyone made experiences in hosting his open source project on http:

Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-07-09 Thread Kay Schluehr
_init(self,*args,**kwd) cls.__init__ = new_init class app: __metaclass__ = autoattr def __init__(self, auto_x, y, auto_z = 9): pass >>> a = app(2,5) >>> a.x 2 >>> a.z 9 >>> a.y -> AttributeError Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-07-09 Thread Kay Schluehr
t; pass > > I think that's far more intuitive. Being intuitive is relative to someones intuition. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-07-10 Thread Kay Schluehr
self, .x, y, .z): # self.x, self.z from first and third explicit parameters do_something_with_y() besides that it is more verbose? Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-07-11 Thread Kay Schluehr
Reinhold Birkenfeld schrieb: > Kay Schluehr wrote: > > Dan Sommers schrieb: > > > >> How about this: > >> > >> def __init__(self, self.x, y, self.z): > >> # self.x, self.z from first and third explicit parameters > >>

Re: decorators as generalized pre-binding hooks

2005-07-11 Thread Kay Schluehr
rogrammer on the street. But maybe they should be and there should also be librarys of them representing orthogonal customizations ready for plug in. Since metaclasses follow an "adapt", "customize" or "decorate" semantics it is a good idea not to use inheritance to s

Re: decorators as generalized pre-binding hooks

2005-07-11 Thread Kay Schluehr
Christopher Subich schrieb: > Kay Schluehr wrote: > > I think it would be a good idea to pronounce the similarity between > > function decorators and metaclasses. Metaclasses were once introduced > > as an arcane art of fuzzy bearded hackers or supersmart 'enterprise &g

Ordering Products

2005-07-17 Thread Kay Schluehr
roduct with factors in M be evaluated/simplified under the condition of additional information X? It would be interesting to examine some sorting algorithms on factor lists with constrained item transpositions. Any suggestions? Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Ordering Products

2005-07-17 Thread Kay Schluehr
Diez B.Roggisch wrote: > Kay Schluehr gmx.net> writes: > > > Now lets drop the assumption that a and b commute. More general: let be > > M a set of expressions and X a subset of M where each element of X > > commutes with each element of M: how can a product with fa

Re: Ordering Products

2005-07-17 Thread Kay Schluehr
Ron Adam wrote: > Kay Schluehr wrote: > > Here might be an interesting puzzle for people who like sorting > > algorithms ( and no I'm not a student anymore and the problem is not a > > students 'homework' but a particular question associated with a >

Re: Ordering Products

2005-07-18 Thread Kay Schluehr
Bernhard Holzmayer schrieb: > Kay Schluehr wrote: > > > > > Now lets drop the assumption that a and b commute. More general: let be > > M a set of expressions and X a subset of M where each element of X > > commutes with each element of M: how can a product with

Re: goto

2005-07-18 Thread Kay Schluehr
int "Outer loop executing. i = %d"%i for j in range(2): print " Inner loop executing. j = %d"%j if i == 3: raise stop print "Loop exited. i = %d"%i # message does not print except stop:

Re: Ordering Products

2005-07-18 Thread Kay Schluehr
Ron Adam wrote: > Kay Schluehr wrote: > > Here might be an interesting puzzle for people who like sorting > > algorithms ( and no I'm not a student anymore and the problem is not a > > students 'homework' but a particular question associated with a >

Re: Ordering Products

2005-07-19 Thread Kay Schluehr
),c) This kind of pattern can be used to define rules about l_assoc and r_assoc. Nevertheless, there is no loss of generality. The system lacks prevention from deriving some class providing __mul__ and overwrite the implementation of __mul__ using l_assoc. People may do this on their own risk. Kay -- http://mail.python.org/mailman/listinfo/python-list

Documentation bug: Python console behaviour changed

2005-07-19 Thread Kay Schluehr
it at all ;) IPython closes with 'Ctrl-D'. Thanks to IPython I also determined this as the correct shutdown keys for Python too. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation bug: Python console behaviour changed

2005-07-19 Thread Kay Schluehr
Peter Hansen schrieb: > Kay Schluehr wrote: > > The documentation of the Python console behaviour is not correct > > anymore for Python 2.4.1. At least for the Win2K system I'm working on > > 'Ctrl-Z' does not shut down the console but 'Ctrl-D'

Re: Ordering Products

2005-07-19 Thread Kay Schluehr
Ron Adam wrote: > Kay Schluehr wrote: > > > > Hi Ron, > > > > I really don't want to discourage you in doing your own CAS but the > > stuff I'm working on is already a bit more advanced than my > > mono-operational multiplicative algebra

Re: python certification

2005-07-20 Thread Kay Schluehr
sure whether they are more impressed about people learning the Python tutorial, than about people using it to write real world applications. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: python certification

2005-07-20 Thread Kay Schluehr
Andreas Kostyrka schrieb: > (These are the people look for Pearl and Pyhton programmers ;) ) Or Phyton :) Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Lists & "pointers"

2005-07-23 Thread Kay Schluehr
is is a weakness of the algorithm. One usually doesn't want to duplicate a function so that a new reference of a function is not needed because it is readonly and the algorithm could reuse the same reference. For classes I don't if the assertion in the docs is actually true? >>> class A:pass >>> copy.deepcopy(A) >>> class A(object): ... def __init__(self):pass ... >>> copy.deepcopy(A) >>> Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: A replacement for lambda

2005-07-30 Thread Kay Schluehr
left shift operator. To make it > less than and a function, insert a space: > < > -- > - Tim Roberts, [EMAIL PROTECTED] > Providenza & Boekelheide, Inc. Python does have such a greedy/longest match tokenizer too: >>> 2 .__add__(3) # insert whitespace bef

Re: A replacement for lambda

2005-07-30 Thread Kay Schluehr
x <- y For loops can be replaced by functional constructs ( use map() or a list/generator comprehension ). Finally the lambda keyword can be replaced by expressional syntax e.g. ( EXPR from ARGS ): Examples: f = ( || x>=0 then f(x) || True then f(-x) from (x,) ) g = ( || x< 0 then self._a <-x || self._a <- 0 from (x,)) Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: A replacement for lambda

2005-07-30 Thread Kay Schluehr
Paul Rubin wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > Examples: > >f = ( || x>=0 then f(x) || True then f(-x) from (x,) ) > >g = ( || x< 0 then self._a <-x || self._a <- 0 from (x,)) > > Is this an actual language? It lo

Re: Ten Essential Development Practices

2005-07-30 Thread Kay Schluehr
ors. J2EE or the JavaCard API are prominent examples. This is very different from the just-for-fun or heroic-hacker attitude due to spare-time programmers who create a bit of code they are interested in and leaving the rest aside. It's not all just marketing blabla that makes Javas success. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparison of functions

2005-07-30 Thread Kay Schluehr
gt; True True at 0x00EE8AB0> at 0x00EE83F0> False False Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Wheel-reinvention with Python

2005-07-31 Thread Kay Schluehr
hope ever watching the ground. If some error occurs, which layer has to be addressed? Which developing group is reponsible? My own or that of team A, team B, team C ... ? The baroque concept is repulsive to me and only acceptable in case of legacy code that gets wrapped around old one and is dedicated to substitute it continously. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Wheel-reinvention with Python

2005-07-31 Thread Kay Schluehr
u report to the Tkinter maintainers and they will get it fixed. As long as the chain of layers does not break and the conveyor-belt rolls efficiently it's like living in theory ;) Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: namespaces

2005-07-31 Thread Kay Schluehr
in the list. You might pollute your modules namespace but this is exactly what is it good for. You just have to care not to pollute the namespaces of other modules preserving locality. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Wheel-reinvention with Python

2005-08-01 Thread Kay Schluehr
Dabo, AnyGUI, PyGUI etc. this would be the right level to create an abstraction layer IMO. By the way the demo applications of venster run stable and fast on WinXP. Kay -- http://mail.python.org/mailman/listinfo/python-list

Decline and fall of scripting languages ?

2005-08-06 Thread Kay Schluehr
No good news for scripting-language fans: http://www.phpmag.net/itr/news/psecom,id,23284,nodeid,113.html Regards Kay -- http://mail.python.org/mailman/listinfo/python-list

python-list@python.org

2005-08-06 Thread Kay Schluehr
def f(): print &&x # unshadowing x defined on module level f() g() Since we can always shadow some module scoped variable defining a local one we might create a side-effect binding values to the unshadowed name: x = 0 def f(): x = 1 &x = 7 >>> f() >>> x 7 Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Fat and happy Pythonistas (was Re: Replacement for keyword 'global' good idea? ...)

2005-08-06 Thread Kay Schluehr
s a lot of effort in exploring the boundary between what can be inferred from Python code and translated into lower level languages before program execution and what has to be passed to some code specializer at runtime. That's where new insights about dynamic languages may come from. Kay PS.

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Kay Schluehr
I would say that those languages are also cutting edge in language theory research. It should be definitely interesting to you. Since there is no single language implementation you might also find one that supports concepts you need most e.g. concurrency: http://cml.cs.uchicago.edu/ Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Kay Schluehr
loned and *improved* by Microsoft. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Kay Schluehr
Martin P. Hellwig wrote: > Kay Schluehr wrote: > > Eric Pederson wrote: > > > >>Raise your hand if you think the best technology wins! > > > > > > Who is interested in such a matter? Is this a forum dedicated to some > > programming language or a pop

Re: Chopping off spaces at both ends

2005-08-07 Thread Kay Schluehr
Use the strip() method. Example: >>> "\t abc\n".strip() "abc" Variants are lstrip() and rstrip(). Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP: Specialization Syntax

2005-08-07 Thread Kay Schluehr
ef makeClass(cls_name, **kw): return type(cls_name,(), kw) >>> MyObject = makeClass("MyObject",a=8) >>> MyObject >>> MyObject.a 8 Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP: Specialization Syntax

2005-08-08 Thread Kay Schluehr
Nicolas Fleury schrieb: > Kay Schluehr wrote: > > def makeClass(cls_name, **kw): > > return type(cls_name,(), kw) > > > >>>>MyObject = makeClass("MyObject",a=8) > >>>>MyObject > > As said to Bengt, a place is needed to write

Re: Python -- (just) a successful experiment?

2005-08-08 Thread Kay Schluehr
thon docs. Did you ever check out ctypes? I appreciate it very much. http://starship.python.net/crew/theller/ctypes/ Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python -- (just) a successful experiment?

2005-08-08 Thread Kay Schluehr
e interested in". Yes, the Python experiment was (not just) successfull. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: python for microcontrollers

2005-08-08 Thread Kay Schluehr
mplicit or explicit finalization. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python -- (just) a successful experiment?

2005-08-08 Thread Kay Schluehr
stors namely the commedians of Monty Python. Becoming sentimental about this and as a true and proud reactionary K always seemed to be a fundamentalist somehow. Not an excuse but an explanation. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python supports LSP, does it?

2005-08-11 Thread Kay Schluehr
nt preserves LSP: if isinstance(obj,T): ... Therefore one can write programs that work as if LSP was valid and subtypes indeed exist. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-17 Thread Kay Schluehr
ue freedom to experiment with other more interesting things besides this. But the struggle just starts again with the new project ;) Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in slice type

2005-08-21 Thread Kay Schluehr
we remember how -1 is interpreted as an index not as some limit the behaviour makes perfect sense. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposed PEP: New style indexing, was Re: Bug in slice type

2005-08-21 Thread Kay Schluehr
give up, but it should be specified by the slicing/indexing > operation, not by the value of the index expression. It is a Python gotcha, but the identity X[-1] == X[len(X)-1] holds and is very usefull IMO. If you want to slice to the bottom, take 0 as bottom value. The docs have to be extended in this respect. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Yielding a chain of values

2005-08-31 Thread Kay Schluehr
x27;m afraid. > > Reinhold Is the statement yield from iterable also in danger to be ambigous? The resolution of "(yield) from iterable" into _ = (yield) x = _ from iterable would not result in valid Python syntax. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Bicycle Repair Man usability

2005-08-31 Thread Kay Schluehr
d but neither defines requirements nor leads a discussion about refactoring methods in Python. Needless to say that the code is not well documented. Kay -- http://mail.python.org/mailman/listinfo/python-list

Infinity syntax. Re: Bug in string.find; was...

2005-08-31 Thread Kay Schluehr
gt; -!0 -!0 >>> range(9)[4:!0] == range(9)[4:] True >>> range(9)[4:-!0:-1] == range(5) True Life can be simpler with unbound limits. Kay -- http://mail.python.org/mailman/listinfo/python-list

Infinity syntax. Re: Bug in string.find; was...

2005-08-31 Thread Kay Schluehr
gt; -!0 -!0 >>> range(9)[4:!0] == range(9)[4:] True >>> range(9)[4:-!0:-1] == range(5) True Life can be simpler with unbound limits. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Infinity syntax. Re: Bug in string.find; was...

2005-08-31 Thread Kay Schluehr
to: >>> Inf Inf >>> Inf+1 Inf >>> Inf>n# if n is int True >>> Inf/Inf Traceback (...) ... UndefinedValue >>> Inf - Inf Traceback (...) ... UndefinedValue >>> -Inf -Inf >>> range(9)[4:Inf] == range(9)[4:] True >>> range(9)[4:-Inf:-1] == range(5)[::-1] True IMO it's still consice. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Yielding a chain of values

2005-08-31 Thread Kay Schluehr
Reinhold Birkenfeld wrote: > Kay Schluehr wrote: > > Reinhold Birkenfeld wrote: > > > >> > x = [ yield r for r in iterable ] > >> > >> Which is quite different from > >> > >> x = (yield) in iterable > >> > >> which

Re: Epydoc - Documenting class members?

2005-08-31 Thread Kay Schluehr
This should help: http://epydoc.sourceforge.net/fields.html Kay -- http://mail.python.org/mailman/listinfo/python-list

PEP-able? Expressional conditions

2005-09-07 Thread Kay Schluehr
) (COND1,EXPR1) || (COND2,EXPR2) (b) (COND1,EXPR1) case (COND2,EXPR2) (c) (COND1,EXPR1) owise (COND2,EXPR2) (d) (COND1,EXPR1) ? (COND2,EXPR2) Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP-able? Expressional conditions

2005-09-07 Thread Kay Schluehr
Terry Hancock wrote: > On Wednesday 07 September 2005 05:29 am, Kay Schluehr wrote: > > Instead of pushing statements into expressions one can try to do it the > > other way round and model expressions with the functionality of > > statements. > > > Alternativ

Re: PEP-able? Expressional conditions

2005-09-07 Thread Kay Schluehr
Terry Reedy wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > No, as I explained it is not a ternary operator and it can't easily be > > implemented using a Python function efficiently because Python does not > &g

Re: Yielding a chain of values

2005-09-07 Thread Kay Schluehr
gt; so how about a "reyield" or some other new keyword (cause reyield is > too quircky) instead of joining stuff which once ment something (one > thing)? What about dleiy? I guess it thinks me. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Migrate PYD Files

2005-09-08 Thread Kay Schluehr
python24.PyRun_SimpleString("from time import time,ctime\n") python24.PyRun_SimpleString("print 'Today is',ctime(time())\n"); python24.Py_Finalize() Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about consistency in python language

2005-09-08 Thread Kay Schluehr
# new sorted list >>> l.sort()# sort list inplace >>> l.appended(4) # new extended list [1,2,3,4] >>> l.append(4) # appends an element to the same list >>> l [1,2,3,4] Preserving the naming convention we would have >>> "".joined(["d","o","g"]) "dog" Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about consistency in python language

2005-09-09 Thread Kay Schluehr
e trait. The sorted() function could remain available for convenience. > And even if you do add the abstract class, how do you make my example > work without explictly converting the iterator to a list type? I don't know how sorted() is implemented? A naive implementation would in fact be nothing else then: def sorted(iter): l = list(iter) l.sort() return l Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about consistency in python language

2005-09-09 Thread Kay Schluehr
Terry Reedy wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On the other hand there exists no sorted() method for tuples or lists > > like join() for strings but it is implemented as a function in Python24 > >

Re: Why do Pythoneers reinvent the wheel?

2005-09-10 Thread Kay Schluehr
eir crude pragmatism than Java or Haskell programmers ( some might object that it is a bit unfair to equate Java and Haskell programmers, because no one ever claimed that the latter need code-generators and no intelligence to do their work ). Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about consistency in python language

2005-09-11 Thread Kay Schluehr
Steve Holden wrote: > Kay Schluehr wrote: > > Mike Meyer wrote: > > > > > >>Yes, but the function "sorted" is more useful than a list method > >>"sorted" in a duck typing language. > > > > > > I don't see what this

Re: Grouping lists

2005-09-12 Thread Kay Schluehr
break regions.sort() This returns [(0, 3), (4, 4), (5, 5), (6, 9), (10, 12)] Now splitting l in regions: >>> [l[i:j+1] for (i,j) in regions] [[1, 1, 1, 1], [3], [5], [1, 1, 1, 1], [7, 7, 7]] Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Self reordering list in Python

2005-09-15 Thread Kay Schluehr
ordering list if I have to do some pattern recognition in order to select the correct image. Holding a reference as a search key a Python hash-table will always have a better average time complexity no matter which language is used to implement move-front. In either way I'd use Python as an im

  1   2   3   4   5   6   7   8   >