Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-08-30 Thread Bengt Richter
gt;can have a table that is indexed from e.g. -4 to +6. So how am >I supposed to easily get at that last value? Give it a handy property? E.g., table.as_python_list[-1] Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Yielding a chain of values

2005-08-30 Thread Bengt Richter
this. And if there isn't, > >Greenlets, perhaps? (for which, see google). > Maybe yield in inner() could be sugar for the above and become something optimized? Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Precise timings ?

2005-08-30 Thread Bengt Richter
either average brute force or discard outlier timings and average, or return best-of. All these have different error properties, and depend on lots of stuff. I'm wondering whats your application is. Maybe you need a real-time OS? Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Yielding a chain of values

2005-08-30 Thread Bengt Richter
On Tue, 30 Aug 2005 23:12:35 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> On Tue, 30 Aug 2005 12:18:59 GMT, Michael Hudson <[EMAIL PROTECTED]> wrote: >> >>>Talin <[EMAIL PROTECTED]> writes: >>> >>>

Re: Yielding a chain of values

2005-08-31 Thread Bengt Richter
On Tue, 30 Aug 2005 21:23:39 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> On Tue, 30 Aug 2005 23:12:35 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> >> wrote: >>>Bengt Richter wrote: >>>>Maybe >>>>

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-08-31 Thread Bengt Richter
On 31 Aug 2005 07:26:48 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >Op 2005-08-30, Bengt Richter schreef <[EMAIL PROTECTED]>: >> On 30 Aug 2005 10:07:06 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> >>>Op 2005-08-30, Terry Reedy schreef <[EMA

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

2005-08-31 Thread Bengt Richter
On 31 Aug 2005 07:13:26 -0700, "Kay Schluehr" <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: > >> How about interpreting seq[i] as an abbreviation of seq[i%len(seq)] ? >> That would give a consitent interpretation of seq[-1] and no errors >> for any value

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-09-02 Thread Bengt Richter
27;final'] > >>> a = Zbrxlist(list('abcde')) >>> a Zbrxlist(['a', 'b', 'c', 'd', 'e']) Forgot to provide a __len__ method ;-) >>> a[len(a.value):len(a.value)] = ['end'] >>> a Zbrxlist(['a', 'b', 'c', 'd', 'e', 'end']) lastx refers to the last items by zero-based reverse indexing >>> a[lastx] "[Zbrx(0)]: 'end'" >>> a[lastx:lastx] = ['last'] >>> a Zbrxlist(['a', 'b', 'c', 'd', 'e', 'last', 'end']) As expected, or do you want to define different semantics? You still need to spell len(a) in the slice somehow to indicate beond the top. E.g., >>> a[lastx-1:lastx-1] = ['final'] >>> a Zbrxlist(['a', 'b', 'c', 'd', 'e', 'last', 'end', 'final']) Perhaps you can take the above toy and make something that works they way you had in mind? Nothing like implementation to give your ideas reality ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Record separator for readlines()

2005-09-02 Thread Bengt Richter
import StringIO as SIO >>> f = SIO('123xx678xxCxx_and so forth') >>> for s in ireadlines(f,'xx',4): print repr(s), ... '123xx678xx' 'Cxx_and so forth' >>> for s in ireadlines(f,'xx',5): print repr(s), ... '' oops >>> f.seek(0) >>> for s in ireadlines(f,'xx',5): print repr(s), ... '123xx' '678xx' 'Cxx' '_and so forth' Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: 'isa' keyword

2005-09-02 Thread Bengt Richter
imilar fashion, which gives me the feeling that -xx- as custom infix operator would work for a lot of contexts. BTW, the ast for "left |isa| right" is Bitor([Name('left'), Name('isa'), Name('right')]) which probably makes it faster to recognize. Obviously subtrees not involving the specal op names would be ignored. I don't know if ast-rewriting on the fly during customizable import excites anyone, or if those who understand what I'm doing would just rather I didn't post about it "devant les enfants" ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

discarded iterator.next() at interactive global scope doesn't bump interator??

2005-09-04 Thread Bengt Richter
am running it in a console window. Python 2.4b1 (#56, Nov 3 2004, 01:47:27) [GCC 3.2.3 (mingw special 20030504-1)] on win32 Type "help", "copyright", "credits" or "license" for more information. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: discarded iterator.next() at interactive global scope doesn't bump interator??

2005-09-04 Thread Bengt Richter
On Sun, 04 Sep 2005 10:10:33 +0200, Peter Otten <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: > >[it.next() appears to be a noop in the interactive interpreter] > >> I guess it could be in the read-eval-print loop > >Indeed: > >>>> for i in r

Re: documentation error

2005-09-04 Thread Bengt Richter
r deleting the sentence in which the Python doc tries to >define mathematical integers. > > Integers > > [In Python] There are three types of integers: > This is a nice site: http://mathworld.wolfram.com/WholeNumber.html http://mathworld.wolfram.com/topics/Integers.html Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Assigning 'nochage' to a variable.

2005-09-05 Thread Bengt Richter
the larger context might be fine or not, but no one can say ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Job Offer in Paris, France : R&D Engineer (Plone)

2005-09-05 Thread Bengt Richter
e main language requirement (stated, that is ;-) But "capacité de dialoguer avec des usagers non techniques et tous les membres de l'équipe" probably means French too ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible improvement to slice opperations.

2005-09-05 Thread Bengt Richter
#x27; r => [0, 1, 'b', 'a', 4, 5] but two reverse relative slices match order, so r = range(10) r[5:-3] = range(10)[-1:-3] # rh seq is 9, 8 r => [0, 1, 8, 9, 4, 5] I think this is kind of interesting, and I probably wouldn't have thought of it if I had not been for Ron's enthusiasm for his "misunderstanding" ;-) In a way, "misunderstandings" are the mutations of open source evolution of ideas, most of which die, but some of which mutate again and may occasionally survive. So we need them ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Magic Optimisation

2005-09-05 Thread Bengt Richter
t; task most likely, unless communication is entirely via a mutable task state object, and all that's needed is to me map to that and mess with exit state there and trigger a final .next() to wrap up the generator. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible improvement to slice opperations.

2005-09-05 Thread Bengt Richter
On Mon, 5 Sep 2005 22:56:29 +0200, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: > >>>as long as you have people that insist that their original misunderstandings >>>are the only correct way to model the real world, and that all observe

Re: Possible improvement to slice opperations.

2005-09-05 Thread Bengt Richter
7;100' >>> bc(-1^3L, 2) '100' >>> bc(~3L, 8) '74' >>> bc(-1-3L, 8) '74' >>> bc(-1^3L, 8) '74' >>> bc(~3L) '96' >>> bc(-1-3L) '96' >>> bc(-1^3L) '96' >>> bc(bcdecode(bc(~3L))) '96' >>> bc(bcdecode(bc(~3L, 2),2),2) '100' >>> bc(~3L, 16) 'fc' >>> bc(-1-3L, 16) 'fc' >>> bc(-1^3L, 16) 'fc' >>> bc(3L) '03' Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible improvement to slice opperations.

2005-09-05 Thread Bengt Richter
;> import sys >>> bc(sys.maxint*4, 16) '01fffc' >>> bc(~sys.maxint*4, 16) 'fe' oops, precendence ... >>> bc(~(sys.maxint*4), 16) 'fe0003' vs. the useless >>> hex(~(sys.maxint*4)) '-0x1FF

Re: Magic Optimisation

2005-09-05 Thread Bengt Richter
On Mon, 05 Sep 2005 21:39:31 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: >On 5 Sep 2005 07:27:41 -0700, "Paul McGuire" <[EMAIL PROTECTED]> wrote: > >>I still think there are savings to be had by looping inside the >>try-except block, which avoids many setup/t

Re: py2exe 0.6.1 released

2005-09-05 Thread Bengt Richter
ral other fixes. > >Homepage: > ><http://starship.python.net/crew/theller/py2exe> > >Download from the usual location: > ><http://sourceforge.net/project/showfiles.php?group_id=15583> > >Enjoy, > >Thomas > I haven't tried this, but I am getting interested in cannibalizing some functionality ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Online Modification of Python Code

2005-09-05 Thread Bengt Richter
args = map(float, cmd[1:]) print getattr(algomodule, cmd[0], (lambda name, *ign: 'No such function: %r'%name).__get__(cmd[0], str))(*args) this would (theoretically ;-) let you type commands like sqrt 9 and have alogomodule.sqrt called with float('9'), and then edit and edit the module source in notepad, and then sqrt 16 and have the new function called, etc. The cmd module will let you set up something fancier than above, and obviously you don't have to run notepad ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: dual processor

2005-09-06 Thread Bengt Richter
7;m fairly certain that 'sort' won't start spending CPU time >until it has collected all its input, so you won't gain much >there either. > Why wouldn't a large sequence sort be internally broken down into parallel sub-sequence sorts and merges that separate processors can work on? Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible improvement to slice opperations.

2005-09-06 Thread Bengt Richter
On Tue, 06 Sep 2005 10:31:33 GMT, Ron Adam <[EMAIL PROTECTED]> wrote: >Steve Holden wrote: [...] > >> My point was that you can make those changes in your own code, leaving >> others to accept the situation as it is. > >It's only a suggestion and an interesting idea I thought I would share >and s

Re: Possible improvement to slice opperations.

2005-09-06 Thread Bengt Richter
e thought (and some additional considerations) I hadn't read yours yet, or I would have mentioned it ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe 0.6.1 released

2005-09-06 Thread Bengt Richter
tion is primarily used by graphics applications to create a console window. Graphics applications are initialized without a console. Console applications are normally initialized with a console, unless they are created as detached processes (by calling the CreateProcess function with the DETACHED_PROCESS flag). See Also CreateProcess, FreeConsole, GetStdHandle Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: round function problem

2005-09-06 Thread Bengt Richter
t;Is it a bug or a control behavour ? I don't understand ?!?!?!?!... > Others have pointed out the output formatting and binary representation problems behind your question, but I thought you might not realize the above. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP-able? Expressional conditions

2005-09-08 Thread Bengt Richter
s both the true and false results, >> which may have side effects. > >If you are depending on that kind of nit-picking behavior, >you have a serious design flaw, a bug waiting to bite you, >and code which shouldn't have been embedded in an expression >in the first place. > Or you might know excatly what you are doing ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about consistency in python language

2005-09-08 Thread Bengt Richter
enumerate('dab')) {'a': 2, 'b': 1, 'd': 3} though note that dict wants the sequence as a single argument: >>> dict( ('d', 3), ('a', 2), ('b', 1) ) Traceback (most recent call last): File "", line 1, in ?

Re: Python linear algebra module -- requesting comments on interface

2005-09-09 Thread Bengt Richter
lues that would appear in full matrix representations of the same. http://www.rush3d.com/reference/opengl-redbook-1.1/appendixg.html Also wondering about some helper function to measure sensitivity of .solve results when getting near-singular, but maybe that's an out-side-of-the package job.

Re: Why do Pythoneers reinvent the wheel?

2005-09-10 Thread Bengt Richter
r the chance is >that you: >- Search longer for fitting technologies >- Adapt your road - Think more carefully about ego satisfaction cost/benefit vs getting the job done ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: python callbacks and windows

2005-09-11 Thread Bengt Richter
.org/pub/python/2.4.1/Python-2.4.1.tgz is ~9mb) and people could also post with url references to particular sources. Seems like providing source trees could be automated, so there would only be an initial effort involved. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Premature wakeup of time.sleep()

2005-09-13 Thread Bengt Richter
e, unless the OS goes to the net for a more accurate time. Usually drift swamps the second resolution in short order though (a problem for networked parallel makes BTW?) Enough rambling ... Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Unexpected Behavior Iterating over a Mutating Object

2005-09-14 Thread Bengt Richter
_ of a container being iterated over effectively modifies the initial parameters of the iteration control, so there you need either to have intimate knowledge of how the iterator does its thing, or you have to insulate yourself from that need. OTOH, a mutation of the content can be safe, if it doesn't modify the content yet to be accessed during the iteration. In the case of a list, the order can be depended on, so it's not that hard. Other iterable containers are not so clear, and of course even in a list you could have cases of access to early items having side effects on upcoming items, e.g., if the "keep" evaluation had side effects on deep data shared between early and later list items. But that would be nasty any which way ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing at the beginning of a file

2005-09-14 Thread Bengt Richter
n't modify or delete an existing important file until you know you have a new representation safely completed. I say "new representation" since that also covers the possiblity of original plus diff patch file as separate files, which could also be an option. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Property and "fset" in Python 2.4

2005-09-14 Thread Bengt Richter
clog up the digest with details and code snippets, does this sound >familiar to anyone? > A snippet demonstrating a real bug would be helpful. A snippet demonstrating a misunderstanding could be helpful. What's the problem? ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Bengt Richter
>Another poster suggested a solution using struct. Here's my >solution (which assume python integers are represented in 2's >compliment binary): > >def ioctlValue(i): >if i & 0x8000: >i = -((i^0x)+1) >return i > Do you think it's PEP-able, or should I quit being obnoxious ;-) I think str.mod format like %x except %.b would make it easy to write '0h%08b.16' % a_signed_integer and get something both readable and inputtable as a constant. (0h. would be short for 0b16.) BTW, %b (or %B for uppercase) could default to base 16. The ouput would only be as wide as necessary, with the leading digit guaranteed 0 or f (which is 0 or in the general case). Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Bengt Richter
thon interface, in which case an interface object could have a suitable property to do the final trimming or padding of bits. Or do you want to define some kind of mathematical space? For specifying bits in literals see my other post in this thread (I think ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary sorting problem

2005-09-16 Thread Bengt Richter
gt;'lucy':4, >'sky':55, >'diamonds':239843, >'yesterday':4 } > >items = sorted( (v,k) for (k,v) in original.iteritems() ) >items.reverse() # depending on what order you want >print items > > >The result is: >[(239843, '

Re: Wrapping float

2005-09-17 Thread Bengt Richter
(most recent call last): > File "", line 1, in ? >TypeError: float() takes at most 1 argument (2 given) > >So my question to you is: how can I change my code so I can pass two >values to the WrapFloat constructor? > Float is an immutable, so you need to override __new__ Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary sorting problem

2005-09-17 Thread Bengt Richter
On 17 Sep 2005 11:01:41 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: > >> or tell sorted what to do ;-) >> >> >>> original= { >> ... 'hello':135, >> ... 'goodbye':30, >> ... 'lucy':4,

Re: sorting tuples...

2005-09-17 Thread Bengt Richter
in groupby(lines, ... lambda line:line.strip()!='') if k): ... print ''.join(t) ... 200501221530 John *** long string here *** 200503130935 Jeremy *** jeremy string here 200504151625 Clyde *** clyde's long string here *** >>> If your source of line groups is not delimited by blank lines, or has other non-blank lines, you will have to change the source or change the lambda to some other key function that produces one value for the lines to include (True if you want to use if k as above) and another (False) for the ones to exclude. HTH Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible bug in "metaclass resolution order" ?

2005-09-18 Thread Bengt Richter
mt.__new__:', mt.__new__ ... something = mt.__new__(mt, cname, cbases, cdict) ... print 'something:', something ... return something ... >>> class B(A): __metaclass__ = bar ... cname, cbases: B (,) cdict: {'__module__': '__main__', '__metaclass__': } mt: mt.mro(mt): [, ] mt.__new__: something: >>> And the something returned, whatever it is, if no checking is triggered by normal use, gets bound to the class name, e.g., >>> class C(A): __metaclass__ = lambda *a:('silly', 'result') ... >>> C ('silly', 'result') Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Question About Logic In Python

2005-09-19 Thread Bengt Richter
d act like if False if 1 would act like if True if 0.0would act like if False if 5.0would act like if True if '' would act like if False if 'a'would act like if True if [] would act like if False if [1]would act like if True if {} would act like if False if {1: 2} would act like if True Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: How to program efficient pattern searches in a list of float numbers?

2005-09-19 Thread Bengt Richter
On 19 Sep 2005 00:02:34 -0700, "malv" <[EMAIL PROTECTED]> wrote: >Simple case: >In this list, how to find all occurences of intervals of n adjacent >indexes having at least one list-member with a value between given >limits. >Visualizing the list as a two-dimensional curve, this is like >horizonta

Re: How to program efficient pattern searches in a list of float numbers?

2005-09-19 Thread Bengt Richter
On Mon, 19 Sep 2005 22:58:40 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: >On 19 Sep 2005 00:02:34 -0700, "malv" <[EMAIL PROTECTED]> wrote: > >>Simple case: >>In this list, how to find all occurences of intervals of n adjacent >>indexes having at least on

Re: Question About Logic In Python

2005-09-21 Thread Bengt Richter
you can use other expressions than bool(x) to get the boolean value, but you may have to think more about whether (x and 1) will do it, or whether you should write (x!=0) or, in case x can be None, perhaps settle on (x and 1 or 0) as an idiom to play safe. Well, bool(x) is safe, and less typing ;-) OTOH, it's not a hammer for all nails. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Object default value

2005-09-22 Thread Bengt Richter
D_ATTR3 (x) anti-attribute, remove above byte code 51 BUILD_TUPLE 4 54 RETURN_VALUE You might want to do the same for LOAD_GLOBAL/STORE_GLOBAL, and STORE_DEREF/LOAD_DEREF, I don't know. But it wouldn't be a big deal to get a hack working. Thorough testing is another matter, not to mention justifying it ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: exclude binary files from os.walk

2005-02-25 Thread Bengt Richter
in all of this >> pertains to files on Windows XP and Python 2.4 > >Please clarify: is your question about identifying binary (non-ascii) files >or about using os.walk? > > I have a feeling it's about walking directories and identifying which files to should be "cooked" (to normalize line endings when opened and read). Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Safe string escaping?

2005-03-07 Thread Bengt Richter
>> list(sd) ['f', 'o', 'o', '\n', '\x00'] You could make a de-escaping utility function, e.g., >>> def de_esc(s): return s.decode('string_escape') ... >>> s 'foo\\n\\0' >>> de_esc(s) 'foo\n\x00' You might want to write a test to verify that it does what you expect for the kind of escaped string you are using. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Code evaluation at function definition execution time (was Re: Compile time evaluation (aka eliminating default argument hacks))

2005-03-10 Thread Bengt Richter
# presets.py -- a decorator to preset function local variables without a default-argument hack or closure # also does currying, with adjustment of argument count, eliminating named arguments from right. # 20050310 09:22:15 -- alpha 0.01 release -- bokr # Released to the public domain WITH

Re: How can I Read/Write multiple sequential Binary/Text data files

2005-03-10 Thread Bengt Richter
ce? > Are you the same person who posted re this format some time ago? Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterate using tuple as index

2005-03-10 Thread Bengt Richter
#x27;a', 'b', 'c']) >>> for list1_item, list2_item in zip(firstlist, secondlist): ... print list1_item, list2_item ... 1 a 2 b 3 c Or if your lists are very long, you could use an iterator from itertools, e.g., >>> import itertools &

Re: multiple buffers management

2005-03-10 Thread Bengt Richter
t here to play 20-questions. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a short-circuiting dictionary "get" method?

2005-03-11 Thread Bengt Richter
t;d['x']. Suppose d['x'] == 3: > > >>> 3 is not None >True > >>> > maybe (untested) value = ('x' in d and [d['x']] or [bsf()])[0] then there's always if 'x' in d: value = d['x'] else: value = bsf() or try: value = d['x'] except KeyError: value = bsf() Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Preserving the argspec of a function after generating a closure

2005-03-11 Thread Bengt Richter
6 LOAD_FAST0 (x) 9 LOAD_FAST1 (y) 12 BINARY_ADD 13 RETURN_VALUE >>> inspect.getargspec(bar) (['x', 'y'], None, None, None) >>> dis.dis(bar) 1 0 LOAD_FAST0 (x) 3 LOAD_FAST1 (y) 6 BINARY_ADD 7 RETURN_VALUE I don't know where this is leading. What was your goal again? Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: pre-PEP: Print Without Intervening Space

2005-03-11 Thread Bengt Richter
gt;> printf('%03d %r %3d %5.2f %5d\n',1,'two', 0x3, 4.5, fn(6)) 001 'two' 3 4.5064 >> >> Best regards, >> Marcin >> >You could think about teaching them the linelist.append(fn(x)) way, >which then gives you the choice of > > "".join(linelist) - no gaps > "\n".join(lienlist) - one item per line > " ".join(linelist) - spaces between items. > IMO teachers should lead their students into contact with reality, not insulate them from it with delusionary simplifications that they will have to unlearn in order to progress. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: [perl-python] a program to delete duplicate files

2005-03-11 Thread Bengt Richter
re-computing full hashes would be optimal. Compare to sort|uniq as a sieve. You wouldn't want to read through any files any further than you had to. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: How to turn a variable name into a string?

2005-03-11 Thread Bengt Richter
line 6, in __init__ ValueError: You are missing some env vars: ['unknown'] If you have spaces in your environment names (possible?) that would be nasty and you would have to change the "required" __init__ parameter to split on something other than spaces. You could arrange for case-insensitivity if you liked. And if you really wanted to have local or global bindings for your env names, you could easily do that too, but e.g., myenv.XXX seems like a readable way to group things together. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie: dictionary - howto get key value

2005-03-12 Thread Bengt Richter
tdefault(num, []).append(name) if __name__ == '__main__': phone = Twoway({'mike':10,'sue':8,'john':3, 'jack': 3, 'helen' : 10}) print 'jack:', phone['jack'] print 'same phone as jack:', phone[phone['jack']] print 'deleting jack ...'; del phone['jack'] print 'john:', phone['john'] print phone - [13:05] C:\pywk\sovm>py24 twoway.py jack: 3 same phone as jack: ['john', 'jack'] deleting jack ... john: 3 {'mike': 10, 3: ['john'], 8: ['sue'], 10: ['mike', 'helen'], 'sue': 8, 'helen': 10, 'john': 3} Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused with classmethods

2005-03-12 Thread Bengt Richter
t;__main__.A instance at 0x02EF142C> or a different instance >>> foo.__get__(None, A)(A()) <__main__.A instance at 0x02EF18CC> If you don't pass the type, some things won't work fully, but the usual will >>> foo.__get__(a) > As can be seen, the original function is in there in the bound method: >>> foo.__get__(a, A).im_func And you can call it as such if you like: >>> foo.__get__(a, A).im_func('hi, via plain function') hi, via plain function Descriptors are a big deal in the new python. They are at the root of much of the magic. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: dinamically altering a function

2005-03-12 Thread Bengt Richter
>> ... return obj >> ... >> py> myobj = Object() >> py> fun(myobj, 2) >> <__main__.Object object at 0x01162E30> >> py> myobj.b >> 2 >> py> obj = fun(1) >> py> obj.b >> 1 >> >> This doesn't use any bytecode hacks, but I'm still not certain it's >> really the way to go. What is it you're trying to write this way? Yes, that is a good question ;-) > >OO doesnt work here,i have factored to classes with inheritance but it looks >clumsy and it is clumsy to use, this things are in nature,functions. > >What i want is to declare in the decorator some code that is common to all >these functions, so the functions assume that the decorator will be there >and wont need to duplicate the code provided by it, and the functions are >not known ahead of time, it has to be dynamic. Still not sure what you mean by "the functions are not known ahead of time." Please pretend things worked the way you want, and post an example. Maybe we can make it work. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Add Properties to Instances?

2005-03-12 Thread Bengt Richter
rt time >>> inst1 = InstProp() >>> inst2 = InstProp() >>> inst1.t = property(lambda self: time.ctime()) >>> inst2.p2 = property(lambda self: 'prop2') >>> inst1.t 'Sat Mar 12 19:10:40 2005' >>> inst2.p2 'prop2' If you want robust writeable and/or deleteable properties, you will have to do a little more work, but it can be done. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a problem on this simple code

2005-03-12 Thread Bengt Richter
#x27;", '\\', 'x', '8', '3'] >>> len(r"C\x01\x02\x10'\x83") 18 > >> That's 18 bytes. Is the command supposed to be the ASCII >> characters \x01 or a single byte whose value is 1? > >For a start, according to the OP's code, the command ('C' a.k.a. 67) is >first. The 1 is a meant to be a message number. > >Secondly, the hardware smells like it's got an 8080 or 6502 inside. The >likelihood that it groks Python/C string representation is minimal. >Folk just don't send 18 bytes at 9600 bps when 6 bytes will do. > Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Add Properties to Instances?

2005-03-12 Thread Bengt Richter
On Sun, 13 Mar 2005 03:18:51 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: >On 12 Mar 2005 09:48:42 -0800, "Martin Miller" <[EMAIL PROTECTED]> wrote: > >>I'm trying to create some read-only instance specific properties, but >>the following attempt

Re: dinamically altering a function

2005-03-12 Thread Bengt Richter
On Sat, 12 Mar 2005 23:09:58 -0400, vegetax <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: [...] >> Please pretend things worked the way you want, and post an example. Maybe >> we can make it work. >> >> Regards, >> Bengt Richter > >Ok , the comp

Re: is there a problem on this simple code

2005-03-12 Thread Bengt Richter
On 12 Mar 2005 20:12:19 -0800, "John Machin" <[EMAIL PROTECTED]> wrote: > >Bengt Richter wrote: >> On 12 Mar 2005 17:35:50 -0800, "John Machin" <[EMAIL PROTECTED]> >wrote: >> >> > >> >[EMAIL PROTECTED] wrote: >> >>

Re: is there a problem on this simple code

2005-03-13 Thread Bengt Richter
On Sun, 13 Mar 2005 10:46:52 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> Sorry for jumping in with a largely irrelevant comment. I didn't look >> at the code, just sought to illustrate the 6/18 thing further, in a kneejerk >> reactio

Re: brand new to python

2005-03-13 Thread Bengt Richter
gt;raise NoSuchDomain, domainname > return page Careful with the above return's indentation after you fix the try/excepts. > >## >## >-- I've heard pychecker (http://pychecker.sourceforge.net/) catches a lot of stuff. Maybe it would help you. Having lint-eyes, I haven't yet tried it, though it would probably save me some time ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie: dictionary - howto get key value

2005-03-13 Thread Bengt Richter
equivalent, but note that it only works if everyone has a different phone number. >>> dict((v,k) for k,v in {'sue':3, 'bob':4}.items()) {3: 'sue', 4: 'bob'} >>> dict((v,k) for k,v in {'sue':3, 'bob':4, 'mike':4}.items()) {3: 'sue', 4: 'bob'} Surprised at who got left out? >>> {'sue':3, 'bob':4, 'mike':4}.items() [('sue', 3), ('mike', 4), ('bob', 4)] Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Add Properties to Instances?

2005-03-14 Thread Bengt Richter
On 14 Mar 2005 01:19:23 -0800, "Martin Miller" <[EMAIL PROTECTED]> wrote: >In answer to my question about instance properties not working, Bengt >Richter suggest using: >> > >>> class InstProp(object): >> > ... def __getattribute__(self, at

Re: urllib (and urllib2) read all data from page on open()?

2005-03-14 Thread Bengt Richter
>> print r2.status, r2.reason >404 Not Found >>>> data2 = r2.read() >>>> conn.close() > >As far as I can understand, you can read() data only when you want >to. > >Caveat: >There's a warning that says "This module defines classes

Re: a program to delete duplicate files

2005-03-14 Thread Bengt Richter
aven't yet seen an answer to this, >but it's a question for experimentation rather than theory. ISTM 2(m-1) reads is not necessary, so "the question" to me doesn't involve that ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Add Properties to Instances?

2005-03-14 Thread Bengt Richter
On 14 Mar 2005 13:07:29 -0800, "Martin Miller" <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote, in part: >> On 14 Mar 2005 01:19:23 -0800, "Martin Miller" ><[EMAIL PROTECTED]> >> wrote, in part: >> >What still puzzles me, though, is why

Re: Python-list Digest, Vol 18, Issue 208

2005-03-14 Thread Bengt Richter
at almost the entire industry has standardized on >power-of-2 word sizes, octal is nearly useless but is still carried >about for backwards compatibility. > Actually, octal was really handy for PDP-11/45 core dumps, even though it had a power-of-2 (4 -> 16 bits) word size. The reason wa

decorating classes with metaclass

2005-03-14 Thread Bengt Richter
differing in the arguments passed. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: __getitem__ method on (meta)classes

2005-03-14 Thread Bengt Richter
self): return 'Hi' ... >>> c=C() >>> C.ordinary_method >>> c.ordinary_method > >>> c.ordinary_method() 'Hi' >>> C.ordinary_method >>> C.ordinary_method(c) 'Hi' Note the difference between ordinary and classmethod: >>> type(c).ordinary_method >>> type(finst).__getitem__ > BTW, I see a class factory, but no "(meta)"class per se. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: __getitem__ method on (meta)classes

2005-03-14 Thread Bengt Richter
__getitem__=classmethod(__getitem__) ...baz.lst = lst ...return baz ... >>> f = foo([1,2,3])() >>> type(f).__getitem__ > >>> type(f).__getitem__(0) 1 Leaving out the classmethod: >>> def foo(lst): ...class baz(object): ... def __getitem_

Re: __getitem__ method on (meta)classes

2005-03-15 Thread Bengt Richter
gt;... return self.vals[index] >... >py> lst = 'abcd' >py> x = 'b' >py> e1 = enum(lst) >py> v = e1(x) >py> (x in lst) and (e1[v] == x) >True For that, why not just class enum(list): def __call__(self, val): return self.index(val) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib (and urllib2) read all data from page on open()?

2005-03-15 Thread Bengt Richter
On 15 Mar 2005 00:18:10 -0800, "Fuzzyman" <[EMAIL PROTECTED]> wrote: > >Bengt Richter wrote: >> On Mon, 14 Mar 2005 14:48:25 -, "Alex Stapleton" ><[EMAIL PROTECTED]> wrote: >> >> >Whilst it might be able to do what I want I fee

Re: __getitem__ method on (meta)classes

2005-03-15 Thread Bengt Richter
On Tue, 15 Mar 2005 08:32:51 -0800, Ron Garret <[EMAIL PROTECTED]> wrote: >In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Bengt Richter) wrote: > >> >Did you mean type(x).__getitem__(x,y)? >> > >> Not if x is a classmethod, D'oh. I meant &qu

Re: readonly class attribute ?

2005-03-15 Thread Bengt Richter
m(self): print 'method m called' ...x = 123 ... >>> obj = Sub() Instance attributes work normally: >>> obj.x 123 >>> obj.x = 456 >>> obj.x 456 >>> del obj.x If not shadowed, the class var is found >>> Sub.x 123 But it is read-only: >>> Sub.x = 456 Traceback (most recent call last): File "", line 1, in ? File "", line 4, in __setattr__ AttributeError: setting 'x' to 456 not allowed >>> Base.x = 456 Traceback (most recent call last): File "", line 1, in ? File "", line 4, in __setattr__ AttributeError: setting 'x' to 456 not allowed >>> Sub.anything = 'something' Traceback (most recent call last): File "", line 1, in ? File "", line 4, in __setattr__ AttributeError: setting 'anything' to 'something' not allowed Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Lisp-likeness

2005-03-15 Thread Bengt Richter
))) >((= i 10)) >(vector-set! closures i (lambda (x) (+ x i >((vector-ref closures 5) 1000)) >1005 > >and what is perhaps surprising, Perl wins: > >$ perl -e ' > foreach my $i (0..9) { > push @closures, sub {$_[0] + $i} > } > print $closures[5](1000), "\n"' >1005 > > >If you think it's unlikely that one would want to keep a closure >referring to a loop control variable longer than the loop iteration >which has created it, think about the loop body spawning a thread. > Just do what you need to do. Python usually provides a way ;-) Or do you just want what you want using your idea of the right spelling? ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: _conditionally_ returning to point where exception was raised?

2005-03-16 Thread Bengt Richter
nuation object of some kind, that could optionally be called from the exception handler to effect as-if return to the point of an exception and continuation from there as if the exception hadn't happened (except maybe some updated binding in the local context that could be seen by the continuing

Re: RotatingFileHandler and logging config file

2005-03-16 Thread Bengt Richter
from a config file; I'll do it in my code as a >default, and if users want any *other* behavior, they can config *that*. > To fish for yourself, go to google and put RotatingFileHandler site:docs.python.org in the search slot and click search. The first hit is http://docs.python.org

Re: I can do it in sed...

2005-03-17 Thread Bengt Richter
of it while still keeping the matched part. >> >> >> Something like >> re.sub(r'^([A-Z])', r'~\1', target) >> should do it. >> >> Kent > Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python becoming less Lisp-like

2005-03-18 Thread Bengt Richter
mizations to the function-local namespace which prevent >transparent re-binding of global names. And given that the >function-local namespace is by far the most heavily used, and the >relative utility (and wisdom) of using globals in this way, this is a >case where the benefit of the special case is well worth the cost of >its slight inconsistency. The optimization argument goes away with x := something I think, since the x search can be limited to looking in the lexical environment exactly like looking for read-only outer scope names now, just with different consequences for finding or not finding. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: list of unique non-subset sets

2005-03-18 Thread Bengt Richter
;, 'r', 'l']), set(['a', 'e', 'd', 'f']), set(['a', 'c']), set(['i', 'h', 'g'])] [set(['a', 'c'])] [set(['k', 'r', 'l']), set(['a', 'c']), set(['h', 'g'])] [set(['k', 'r', 'l']), set(['h', 'g']), set(['i', 'h'])] [set(['k', 'r', 'l']), set(['a', 'c', 'b']), set(['a', 'e', 'd', 'f']), set(['i', 'h'])] [set(['a', 'e', 'd', 'f']), set(['a', 'c']), set(['i', 'h'])] [set(['a', 'c']), set(['h', 'g']), set(['i', 'h'])] [set(['k', 'r', 'l']), set(['a', 'e', 'd', 'f']), set(['i', 'h'])] [set(['k', 'r', 'l']), set(['a', 'e', 'd', 'f']), set(['a', 'c'])] [set(['a', 'e', 'd', 'f']), set(['i', 'h', 'g'])] [set(['a', 'c', 'b']), set(['a', 'e', 'd', 'f']), set(['h', 'g']), set(['i', 'h'])] [set(['k', 'r', 'l']), set(['a', 'e', 'd', 'f']), set(['a', 'c']), set(['h', 'g'])] [set(['k', 'r', 'l']), set(['a', 'e', 'd', 'f']), set(['h', 'g']), set(['i', 'h'])] [set(['a', 'e', 'd', 'f']), set(['a', 'c'])] [set(['k', 'r', 'l']), set(['h', 'g'])] [set(['k', 'r', 'l']), set(['a', 'e', 'd', 'f']), set(['h', 'g'])] [set(['k', 'r', 'l']), set(['a', 'c']), set(['h', 'g']), set(['i', 'h'])] [set(['h', 'g'])] [set(['k', 'r', 'l']), set(['a', 'c', 'b'])] [set(['k', 'r', 'l']), set(['a', 'c', 'b']), set(['i', 'h'])] [set(['a', 'c', 'b']), set(['i', 'h', 'g'])] [set(['a', 'c', 'b']), set(['a', 'e', 'd', 'f']), set(['h', 'g'])] [set(['a', 'c', 'b']), set(['h', 'g'])] [set(['k', 'r', 'l']), set(['a', 'c', 'b']), set(['a', 'e', 'd', 'f']), set(['h', 'g']), set(['i', 'h'])] [set(['k', 'r', 'l']), set(['i', 'h'])] [set(['k', 'r', 'l']), set(['a', 'c', 'b']), set(['i', 'h', 'g'])] [set(['a', 'c', 'b']), set(['i', 'h'])] [set(['a', 'c']), set(['i', 'h'])] [set(['k', 'r', 'l']), set(['a', 'c']), set(['i', 'h', 'g'])] [set(['k', 'r', 'l']), set(['a', 'e', 'd', 'f']), set(['a', 'c']), set(['h', 'g']), set(['i', 'h'])] [set(['k', 'r', 'l']), set(['a', 'e', 'd', 'f'])] [set(['a', 'c']), set(['h', 'g'])] [set(['k', 'r', 'l']), set(['i', 'h', 'g'])] [set(['a', 'e', 'd', 'f']), set(['a', 'c']), set(['h', 'g'])] [set(['a', 'e', 'd', 'f']), set(['h', 'g']), set(['i', 'h'])] [set(['a', 'c']), set(['i', 'h', 'g'])] [set(['k', 'r', 'l']), set(['a', 'c']), set(['i', 'h'])] [set(['k', 'r', 'l']), set(['a', 'c'])] [set(['a', 'e', 'd', 'f']), set(['h', 'g'])] [set(['k', 'r', 'l']), set(['a', 'c', 'b']), set(['h', 'g']), set(['i', 'h'])] [set(['a', 'e', 'd', 'f'])] [set(['i', 'h', 'g'])] Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: list of unique non-subset sets

2005-03-18 Thread Bengt Richter
#x27;, 'd', 'f']), set(['h', 'g']), set(['i', 'h'])] 5: [set(['k', 'r', 'l']), set(['a', 'e', 'd', 'f']), set(['a', 'c']), set(['h', &#

Re: Pre-PEP: Dictionary accumulator methods

2005-03-18 Thread Bengt Richter
the key should be emphasised more. Hence valadd or such? > >The appendlist() method is not as versatile as setdefault() which can be used >with other object types (perhaps for creating dictionaries of dictionaries). >However, most uses I've seen are with lists. For other uses, plain Python code >suffices in terms of speed, clarity, and avoiding unnecessary instantiation of >empty containers: > >if key not in d: >d.key = {subkey:value} >else: >d[key][subkey] = value > Yes, but duck typing for any obj that supports "+" gets you a lot, ISTM at this stage of this BF ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Pre-PEP: Dictionary accumulator methods

2005-03-18 Thread Bengt Richter
On Sat, 19 Mar 2005 03:14:07 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: [...] >Yes, but duck typing for any obj that supports "+" gets you a lot, ISTM at >this stage >of this BF ;-) Just in case, by "this BF," I meant to refer to my addval idea, with no offens

Re: list of unique non-subset sets

2005-03-18 Thread Bengt Richter
def')] ? I get: 0: [] 6: [set(['a', 'c', 'b']), set(['e', 'd', 'f'])] 6: [set(['a', 'c', 'b', 'e', 'd', 'f'])] Your code above: >>> L = [set('abc'), set('def'), set('abcdef')] >>> length=[len(s) for s in L] >>> L2= sorted(zip(length,range(len(L >>> Lnew=[L[j] for (i,j) in L2] >>> Lnew.reverse() >>> Lun=[Lnew[0]] # list with the result >>> for s in Lnew[1:]: ... keep=True ... for i in range(len( Lun) ): ...if len(s)==len( s & Lun[i] ): ... keep=False ... break ... if keep==True: ...Lun.append( s ) ... >>> Lun [set(['a', 'c', 'b', 'e', 'd', 'f'])] But your successful set list is not unique in its success value (6) ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Pre-PEP: Dictionary accumulator methods

2005-03-19 Thread Bengt Richter
On Sat, 19 Mar 2005 07:13:15 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> On Sat, 19 Mar 2005 01:24:57 GMT, "Raymond Hettinger" <[EMAIL PROTECTED]> >> wrote: >> >>>I would like to get everyone's thoughts on

Re: Operator Overloading

2004-11-29 Thread Bengt Richter
a), >>> type(type(a)))['__getitem__'].__get__( a, type(a)).__call__ Which we can call with the index >>> type(type(a)).__dict__['__dict__'].__get__(type(a), >>> type(type(a)))['__getitem__'].__get__( a, type(a)).__call__(0) 0.5 Fortunately, we don't normally have to think about all that when we write >>> a[0] 0.5 ;-) Caveat: this is not based on reading the code internals, so I could be misinterpreting surface appearances, but at least it ought to be clear that a[0] involves a lot of dynamic decisions that might ordinarlily not be taken, but which must be allowed for in looking for an innocent method like __getitem__ ;-) [Hm, just looking in oubox: this apparently didn't go out the other day.] Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode question

2004-11-29 Thread Bengt Richter
436346798089144038222112768000*x**4 -2718608642882609434610843144764478140416*x**3 +1533994355659295223664305312404777140224*x**2 -388225373807829537910251710026682204160*x +23023948231698183889631576064000) /274094621805930760590852096000 )(x)) for x in xrange(32)]) Not-ready-to-be-mytholo

Re: slicing, mapping types, ellipsis etc.

2004-11-29 Thread Bengt Richter
1 (foo) 6 CALL_FUNCTION0 9 LOAD_GLOBAL 2 (Ellipsis) 12 COMPARE_OP 8 (is) 15 RETURN_VALUE Disassembly of foo: 3 0 LOAD_FAST0 (self) 3 LOAD_CONST 1 (Ellipsis) 6 BINARY_SUBSCR 7 RETURN_VALUE HTH Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Random number generation from functions

2004-11-29 Thread Bengt Richter
m.uniform(0,1)) -0.261249141864835 >>> math.log(1.0-random.uniform(0,1)) -0.99694366818547997 Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntax for extracting multiple items from a dictionary

2004-11-30 Thread Bengt Richter
> >Untested: > >dict( (key,value) for (key,value) in row.iteritems() if key in cols ) If there's an overall why for doing it at all, why not just iterate through keys of interest? I.e., (untested) dict( (key, row[key]) for key in cols ) > >Works in Py2.4 > >Stefan Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntax for extracting multiple items from a dictionary

2004-11-30 Thread Bengt Richter
On Tue, 30 Nov 2004 21:54:46 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: [...] > >If there's an overall why for doing it at all, why not just iterate through >keys of interest? I.e., (untested) > > dict( (key, row[key]) for key in cols ) > Sorry Anton, I didn't se

<    1   2   3   4   5   6   7   8   9   10   >