out
to critique the replies. I'm interested in what the group think makes a
good comp.lang.python reply: too short, too long; too cryptic, too
simplistic, too polite (is their such a thing), too nasty; too
self-effacing, too self-promoting; too long a sig ;-) , too anonymous
...
Paddy
inref(val, lst):
... try:
... return lst[ lst.index(val) ]
... except ValueError:
... return False
...
>>> z = inref(y, x)
>>> z
[1]
>>> z[0] = 33
>>> z
[33]
>>> x
[[0], [33], [2]]
Hope this helps - Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
effect? itertools doesn't seem to have anything that
> will do it.
>
> Thanks,
> Ken
>>> def f(x):
... for s in x: yield s
...
>>> f([1])
?
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
irritation Ken, if you have to maintain code, as I do/have
done, then you remember how many times little inconsistencies have
tripped you up in the past, and offset those gripes against things like
this.
- cheers, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
s in x: yield s
...
>>> is_generator(f)
True
>>> # But look at the following:
>>> def f2(x):
... def g(y):
... for s in y: yield s
... return g(x)
...
>>> f2([1,2,3])
>>> is_generator(f2)
False
>>>
;-)
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
s _Sentinel(object):
' Initial data value when true data has not been fetched/computed
yet'
pass
NO_DATA = _Sentinel
def xyz(a,b,c):
if a == NO_DATA:
# go get a
(Hmm, should that be double underscores on _Sentinel ...).
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
DataSmash wrote:
> Hello,
> I need to search and replace 4 words in a text file.
> Below is my attempt at it, but this code appends
> a copy of the text file within itself 4 times.
> Can someone help me out.
> Thanks!
>
> # Search & Replace
> file = open("text.txt", "r")
> text = file.read()
> fil
t;
> Steve.
Might searching the output of BeautifulSoup(html).prettify() make
things easier?
http://www.crummy.com/software/BeautifulSoup/documentation.html#Parsing%20HTML
- Paddy
--
http://mail.python.org/mailman/listinfo/python-list
Just add one to indices where appropriate, buy her
chocolates. Don't say a thing when you squelch your seventh off-by-one
error. Look interested in the shoe store. (even for the fifth shoe, of
the third store). - *Your partner does vi*
Whoa!
- Paddy :-)
--
http://mail.python.org/mailman/listinfo/python-list
Neil Cerutti wrote:
> The Glk API (which I'm implementing in native Python code)
> defines 120 or so constants that users must use. The constants
> already have fairly long names, e.g., gestalt_Version,
> evtype_Timer, keycode_PageDown.
>
> Calls to Glk functions are thus ugly and tedious.
>
>
why I put XML first :-)
P.P.S. And UML seems to be about pretty diagrams rather than a textual
format, but no doubt, with the size of the companies behind it, there's
probably a textual format hidden in their too.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Thanks paddy, Since the original language from which I am translating
> does not support any of these formats, I will have to write one myself.
> So, which one is easy to write out in a C like environment.
>
> regards,
> Suresh
> Paddy wrote:
> &
tobiah wrote:
> Is WSDL the right answer for in house communication
> between programs written in different languages, or
> is it more for publishing interfaces for use by parties
> outside your own company?
>
> What else is available for sharing complex structures
> with processes running program
hat do, would not do so when they want to impress, or
communicate with a stranger.
The tone of comp.lang.python *is* an asset, I think, to Python that
swearing will diminish.
- Paddy.
P.S. I did a google search and found 540,000 hits for python in c.l.p.
and only 121 for f***. thats less than one in a thousand. Lets keep it
that way please.
--
http://mail.python.org/mailman/listinfo/python-list
John Henry wrote:
> I must be very thick. I keep reading about what decorators are and I
> still don't have a good feel about it. See, for example:
>
> http://alex.dojotoolkit.org/?p=564
>
> and:
>
> http://soiland.no/software/decorator
>
> What exactly do I use decorators for?
Here's my learnin
nd write implementations in
both languages yourself.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Dustan wrote:
> Anyway, I figured out a way to get the builtin
> function 'sum' to work as I need:
> sum([[1,2,3],[4,5,6],[7,8,9]], [])
>
Hah!
No-one expects sum to be used on anything but numbers.
Except lists as above.
No-one expects sum to be used on anything but numbers, and maybe lists
t
Chris Brat wrote:
> I've seen a few posts, columns and articles which state that one of the
> advantages of Python is that code can be developed x times faster than
> languages such as <>.
>
> Does anyone have any comments on that statement from personal
> experience?
> How is this comparison mea
stances = []
def __init__(self, name, strength, dexterity, intelligence):
instances.append(self)
# as before ...
def mod_instances(self):
for inst in instances:
inst.some_property += 1 # or whatever
# (Untested)
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
, preferably without regexp?
>
> Thanks.
>
> Martin
I resisted my urge to use a regexp and came up with this:
>>> from itertools import groupby
>>> s = 'apple=blue+cart'
>>> [''.join(g) for k,g in groupby(s, lambda x: x in '=+'
Paddy wrote:
> [EMAIL PROTECTED] wrote:
>
> > Hi, I'm looking for something like:
> >
> > multi_split( 'a:=b+c' , [':=','+'] )
> >
> > returning:
> > ['a', ':=', 'b', '+', '
John Salerno wrote:
> Paddy wrote:
>
> > You could keep a handle on all object instances created then go through
> > the objects making appropriate changes, e.g:
> >
> >
> > class Character(object):
> > instances = []
> > def __init
Paddy wrote:
> Paddy wrote:
>
> > [EMAIL PROTECTED] wrote:
> >
> > > Hi, I'm looking for something like:
> > >
> > > multi_split( 'a:=b+c' , [':=','+'] )
> > >
> > > returning:
> >
links to their forums which might be able to provide you
with more information.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
maybe this: http://www.pcre.org/pcre.txt and ctypes might work for you?
(I was suprised to find out that PCRE supported POSIX but don't know
what version it supports or how well).
- Pad
--
http://mail.python.org/mailman/listinfo/python-list
ConfigObj?
http://www.voidspace.org.uk/python/configobj.html
- Pad.
--
http://mail.python.org/mailman/listinfo/python-list
Brian wrote:
> First let me say that I appreciate the responses that everyone has
> given.
>
> A friend of mine is a ruby programmer but knows nothing about python.
> He gave me the script below and it does exactly what I want, only it is
> in Ruby. Not knowing ruby this is greek to me, and I woul
;>> def interv2(inlist):
... for i,val in enumerate(inlist):
... if i==0:
... tmp = val
... elif val != valinc:
... yield [tmp, valinc]
... tmp = val
... valinc = val+1
... yield [tmp, valinc]
...
>>> list(interv2(inlist))
[[3, 4], [6, 9], [12, 14], [15, 16]]
=== END interv2 ===
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
I did a little re-arranging of the generator version:
def interv3(inlist):
tmp = inlist[0]
valinc = tmp+1
for val in inlist[1:]:
if val != valinc:
yield [tmp, valinc];
tmp = val
valinc = val+1
yield [tmp, valinc]
--
http://mail.python.org/m
Jim Segrave wrote:
> In article <[EMAIL PROTECTED]>,
> Paddy <[EMAIL PROTECTED]> wrote:
> >=== interv2 ===
> >>>> def interv2(inlist):
> >... for i,val in enumerate(inlist):
> >... if i==0:
> >...
Jim Segrave wrote:
> In article <[EMAIL PROTECTED]>,
> Paddy <[EMAIL PROTECTED]> wrote:
> >
> >What I ran was more like the version below, but i did a quick
> >separation of the line that has the ';' in it and goofed.
> >
> >>
John Machin wrote:
> On 2/06/2006 8:36 AM, Paddy wrote:
>
> Oh the siren call of every new feature in the language!
> enumerate() just to get a first-time test, and then botch it??
>
> Read the following; the replacement version uses a simple old-fashioned
> inelegant flag
Brian Quinlan wrote:
> This is less a Python question and more a optimization/probability
> question. Imaging that you have a list of objects and there frequency in
> a population e.g.
>
> lst = [(a, 0.01), (b, 0.05), (c, 0.50), (d, 0.30), (e, 0.04), (f, 0.10)]
>
> and you want to drawn n items fro
John Salerno wrote:
> I know there's a request for a good IDE at least once a week on the ng,
> but hopefully this question is a little different. I'm looking for
> suggestions for a good cross-platform text editor (which the features
> for coding, such as syntax highlighting, etc.) but not a full
t match next. This is a negative lookahead
assertion. For example, Isaac (?!Asimov) will match 'Isaac ' only if
it's not followed by 'Asimov'.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
P.S. kodos might help you: http://kodos.sourceforge.net/
- Pad.
--
http://mail.python.org/mailman/listinfo/python-list
oes syntax hilighting for Python and code foding.
http://cream.sourceforge.net/
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Anton Vredegoor wrote:
> With the inclusion of ElementTree (an XML-parser) in Python25 and recent
> developments concerning JSON (a very Pythonesque but somewhat limited
> XML notation scheme, let's call it statically typed XML)
> Your thoughts please.
>
> Anton
Hi Anton.
If you mean this JSON: h
esign your own DSL before long you start
to embellish it with more statements or datatypes and before long it
becomes complex. If you used Python from the beginning then you would
have a community for support.
I know the arguments, but every once in a while I think if only I could
craft
Kay Schluehr wrote:
> I have a list of strings ls = [s_1,s_2,...,s_n] and want to create a
> regular expression sx from it, such that sx.match(s) yields a SRE_Match
> object when s starts with an s_i for one i in [0,...,n]. There might
> be relations between those strings: s_k.startswith(s_1) ->
Kay Schluehr wrote:
> with reverse sorting as in your proposal.The naive solution is easy to
> generate but I'm sceptical about its cost effectiveness. On the other
> hand I do not want to investigate this matter if somebody else already
> did it thoroughly.
>
> Regards,
> Kay
Hi Kay,
The only wa
notanotheridiot wrote:
> Hi,
> I have two strings - a docstring containing doctests and a code string
> containing code to be tested with those doctests. I've been trying for
> a day now to run the test without concatenating the two strings,
> adding:
>
> import doctest
> doctest.testmod
>
> to th
bruce wrote:
> hi...
>
> never used perl, but i have an issue trying to resolve some html that
> appears to be "dirty/malformed" regarding the overall structure. in
> researching validators, i came across the beautifulsoup app and wanted to
> know if anybody could give me pros/cons of the app as i
n try
>>> # False in [d[k[i]] == v[i] for i in range(n)]
The order of keys() and the order of values() are related, so a change
to returning sets would also loose this functionality.
Mind you, Never rely on that implied ordering. Always use items().
And so *if* sets were returne
ython, and
wether the the algorithms used could handle the kind of use mentioned
here:
http://groups.google.com/group/comp.lang.python/browse_frm/thread/d297170cfbf1bb34/d4773320e3417d9c?q=constraints+paddy3118&rnum=3#d4773320e3417d9c
Thanks, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Ziga Seilnacht wrote:
> Paddy wrote:
> > I followed the recent anouncement of version 0.9 of PyPi and found out
> > that there was work included on adding constraint satisfaction solvers
> > to PyPy:
> > http://codespeak.net/pypy/dist/pypy/doc/howto-logicobjs
Paddy wrote:
> Ziga Seilnacht wrote:
> > Paddy wrote:
> > > I followed the recent anouncement of version 0.9 of PyPi and found out
> > > that there was work included on adding constraint satisfaction solvers
> > > to PyPy:
> > > http://codespeak.n
Hi,
I am trying to work out why I get UnboundLocalError when accessing an
int from a function where the int is at the global scope, without
explicitly declaring it as global but not when accessing a list in
similar circumstances.
The documentation: http://docs.python.org/ref/naming.html does not g
Frank Millman wrote:
> Paddy wrote:
> > Hi,
> > I am trying to work out why I get UnboundLocalError when accessing an
> > int from a function where the int is at the global scope, without
> > explicitly declaring it as global but not when accessing a list i
Bruno Desthuilliers wrote:
> Frank Millman a écrit :
> > Paddy wrote:
> >
> >>Hi,
> >>I am trying to work out why I get UnboundLocalError when accessing an
> >>int from a function where the int is at the global scope, without
> >>explicitly decl
Paddy wrote:
>
> So,
> An assignment statement may assign an object to a name, in which case
> the name is 'tagged' as being local,
> An assignment statement may mutate a mutable object already bound to a
> name, in which case the assignment will not 'tag' t
less good at solving prolblems in the first languages way.
Googling for Python Anagram, brought up
http://www.voidspace.org.uk/python/nanagram.html#demo-version
maybe you should look at the source code to nanagram for comparison.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers wrote:
> Paddy a écrit :
> > Bruno Desthuilliers wrote:
> >
> >>Frank Millman a écrit :
> >>
> >>>Paddy wrote:
> >>>
> >>>
> >>>>Hi,
> >>>>I am trying to work out why I get
Dennis Lee Bieber wrote:
> On 9 Jul 2006 11:30:06 -0700, "Paddy" <[EMAIL PROTECTED]> declaimed
> the following in comp.lang.python:
>
> > So,
> > An assignment statement may assign an object to a name, in which case
> > the name is 'tagged'
Fredrik Lundh wrote:
> Paddy wrote:
>
> > ... irrelevant as in 'although only mutable objects can have their
> > state modified; if n has a mutable value but the assignment statement
> > changed n to refer to another object, then the name would be tagged as
> >
Bruno Desthuilliers wrote:
Ta.
--
http://mail.python.org/mailman/listinfo/python-list
Paddy wrote:
<>
> Why not make sum work for strings too?
>
> It would remove what seems like an arbitrary restriction and aid
> duck-typing. If the answer is that the sum optimisations don't work for
> the string datatype, then wouldn't it be better to put a t
tinal value to the locking field.
8. Close and flush the file to disk.
I have left what to do if a process has locked the file for too long as
a simple exercise for you ;-).
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
se data later in the flow to more easily extract the info you
want?
>
> TIA for bearing with my ignorance of the clear solution I'm surely
> blind to...
>
> EP
Just some questions that I woud ask myself if given the task.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
to write and fit into the
unit test framework if needed.
http://en.wikipedia.org/wiki/Doctest
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Putty wrote:
> In C and C++ and Java, the 'for' statement is a shortcut to make very
> concise loops. In python, 'for' iterates over elements in a sequence.
> Is there a way to do this in python that's more concise than 'while'?
>
> C:
> for(i=0; i
>
> python:
> while i < length:
>
Joel Hedlund wrote:
> > You might try doctests, they can be easier to write and fit into the
> > unit test framework if needed.
>
> While I firmly believe in keeping docs up to date, I don't think that
> doctests alone can solve the problem of maintaining data integrity in
> projects with more com
-/
|moduleFunc1 |
|moduleVar2 |
| |
/-\
from module1 import moduleClass1 as C1
# namespace becomes
\-----/
|C1 |# C1 === module1.moduleClass1
| |
/-\
- Paddy.
Duncan Booth wrote:
> "Paddy" <[EMAIL PROTECTED]> wrote:
>
> >
> > import module1
> > # namespace becomes:
> >\-/
> > |module1.moduleFunc1 |
> > |module1.moduleClass1: |
> > | class1M
lse` is enclosed by (?=...)
The regular expression engine will surreptitiously check that
'something else' does indeed follow, before returning any match of
'something'.
Unfortunatley the above may be just as hard to decipher as the original
;-)
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
gsomething else').span()
(1, 10)
>>> re.search(r'somethingsomething else', ' somethingsomethingsomething
>>> else').span()
(10, 33)
>>> re.search(r'something(something else)', ' somethingsomethingsomething
>>> else').span()
(10, 33)
>>> re.search(r'something(?=something else)', ' somethingsomethingsomething
>>> else').span()
(10, 19)
>>>
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Paddy wrote:
> tobiah wrote:
> > >> Posted via a free Usenet account from http://www.teranews.com
> > > Its all about context. If you want to match something but only if it
> > > precedes something else, then you follow the regular expression for
> > >
split the string if the delimiter was
> more than one char long (say 'XYZ') ? [yes, I'm aware of re.split, but
> that's not the point; this is just an example. Besides re.split returns
> a list, not an iterator]
>
> George
If your wiling to use groups then the fo
Paddy wrote:
> George Sakkis wrote:
> > It's always striked me as odd that you can express negation of a single
> > character in regexps, but not any more complex expression. Is there a
> > general way around this shortcoming ? Here's an example to illustrate a
>
#x27;t
> uncover?
>
> Thanks!
> Ori.
I wrote up my investigation into function attributes and decorators on
my blog:
http://paddy3118.blogspot.com/2006/05/python-function-attributes.html
http://paddy3118.blogspot.com/2006/05/function-attributes-assigned-by.html
What do you think?
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
>
> I want to know if there is some way to make Python RE behave like grep
> does, or do I have to change to another engine?
Maybe if you posted a (tested) grep example and data, that does as you
want, the group could better understand what you are asking for?
- Paddy.
a,*,;,... in them. It might be best to assume that column
headings might end up with any arbitrary unicode character string and
program from that.
If the OP knows the full extent of his input data and knows that column
names are valid identifiers PLUS Python reserved words then yes, It
stops him from autogenerating identifiers in tht way - but others in
this thread have suggested work-arounds.
And yes, Python is not perfect, but its sweet spot is oh so tasty :-)
(Which also applies to AWK, for a different sweet flavour)
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
> for symmetry (my personal preference).
Strange, but I've never thought of min and max in the way you do. If
anything I think of them as being distinct from sort; a way to get the
appropriate values without going to the bother of a full sort. After
doing my excercises on implementing sort
ommon question. Please search out previous
threads on this topic in comp.lang.python or search www.python.org, or
do a general google around. You should find a LOT of opinion.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
ECTION00514)
Then write a TCL function to traverse your TCL list and write it out in
the python format.
Another suggestion might be to use CSV as an intermediary:
http://tcllib.sourceforge.net/doc/csv.html
http://docs.python.org/dev/lib/module-csv.html
Now if you know Python
for contributing to the
official documentation?
Personally, I thought it was OK back in 199 but I did program in
several other languages, including scripting languages, before Python.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
be so forward as to edit for readability
> (I think a list comprehension to build the actual list is easier to follow
> than the for loop with the strangely-indented comments):
>
> # Create a single Tcl interpretive context for all the work.
> tk_instance = Tkinter.Tk().tk.eval
>
&g
Carl Drinkwater wrote:
> For those who haven't heard of codegolf.com, it can be described as
> "allowing you to show off your code-fu by trying to solve coding
> problems using the least number of keystrokes."
Is having good 'code-fu' worthwhile? It may be trivial to score but do
the results show
Paul McGuire wrote:
> Success lies in the journey, not the destination.
>
> or in Yoda-speak:
>
> In the journey success lies, in the destination not.
>
> -- Paul
Ah, I always wondered what lemmings thought , before splat!!! :-)
- Pad.
--
http://mail.python.org/mailman/listinfo/python-list
rive/c/Documents and Settings/All
Users/Documents/Python tutorial
$ perl -v
This is perl, v5.8.7 built for cygwin-thread-multi-64int
(with 1 registered patch, see perl -V for more detail)
Yep my standard Cygwin perl installation for windows includes the
bignum package.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Did anyone else crack up when Larry Wall described python with the
> statement:
>
> Python, as the "anti-Perl," is heavily invested in maintaining Order.
>
> In the state of the onion address?
>
> http://www.perl.com/pub/a/2006/09/21/onion.html
-3 on QOTW !
The whole ar
ns and a background DOS shell also opens.
> Is there any way to prevent the DOS from opening?
> What is weird is that when I create a freezed version (an executable),
> then the DOS shell doens't open anymore.
> Any clues?
> Thanks for your help
> M.E.
Rename the .p
ample:
bar()
Expected:
11
Got:
10
1 items had no tests:
__main__
**
1 items had failures:
2 of 2 in __main__.foo
2 tests in 2 items.
0 passed and 2 failed.
***Test Failed*** 2 failures.
*** DocTestR
I've finally tracked down a supplier with a large range of pointer
devices:
http://www.keytools.co.uk/mice/default.asp
But I am unable to try them out before I buy.
I was wondering if any Pythonistas had been through this and found
something that worked for them?
- Paddy.
--
http://mail.
Fabian Steiner wrote:
> Bruno Desthuilliers wrote:
> > Fabian Steiner wrote:
> >> I often have to deal with strings like "PCI:2:3.0" or "PCI:3.4:0" and
> >> need the single numbers as tuple (2, 3, 0) or (3, 4, 0). Is there any
> >> simple way to achieve this? So far I am using regular expressions
M) but
> the overall task isn't large enough to justify going out and buying
> one. Anyway, I did the same build on a 2 ghz Athlon 64 and was
> surprised that the speedup was only 35% or so. I'd have to get a
> multiprocessor box to obtain really substantial gains.
Read docu
My french is attrocious so I got Michels original post machine
transated.
I liked what Michel was saying, maybe others would like to share:
Hello! As you are French, you will coprendras me. Then: - windev is
closed, and protected by dongles. Result: dongle lost, broken down, or
flown, a licence s
Antoine De Groote wrote:
> Hello,
>
> Can anybody tell me the reason(s) why regular expressions are not built
> into Python like it is the case with Ruby and I believe Perl? Like for
> example in the following Ruby code
>
> line = 'some string'
>
> case line
>when /title=(.*)/
> puts "Tit
rting in python. Other
documentation sources have a lot more.
P.S. I have not run the code myself
P.P.S. Where is the functions docstring!
P.P.P.S. You might want to read up on enumerate. It gives another way
to do things when you want an index as well as each item from an
iterable but remember, t
t each program?
How easy is it to explain each prog. to an audience that have
programmed, but never in C or Python?
How long would it take to add another feature?
Best and best speed can have many meanings. good luck.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
s no mean feat.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
d
wanted to know why it was talked about so much? I'm from England, I
know that MIT is a very prestigious university, but if Cambridge
changed a course, or better still, The Open University changed a
similar course to Python, I think I'd be hard pressed to hear about it.
Is the MIT cours
done and give them
the option of aborting after generating the copy lists.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Paddy wrote:
> Andre Meyer wrote:
>
> > Hi all
> >
> > os.walk() is a nice generator for performing actions on all files in a
> > directory and subdirectories. However, how can one use os.walk() for walking
> > through two hierarchies at once? I want
Paddy wrote:
> P.S. If you are on a Unix type system you can use tar to do the copying
> as you can easily compress the data if it needs to go over a sow link,
Sow links, transfers your data and then may form a tasty sandwich when
cooked.
(The original should, of course, read ...slow...)
EY, **it can read and edit existing GDSII files**.
And at the bottom of the page:
* Import of existing GDSII files into a layout (import.py)
It looks to be a reader?!
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
e totalizator system allows us to merge or group these four bets as
> follows:
>
> 5 + 7 / 3 / 11 / 7 + 14 / 1 / 9 - $50 ($200 total)
It is unclear to me how you go from the four lines to the one, (or
vice-versa)?
Could you expand the explanation?
- paddy.
--
http://mail.python.org/mailman/listinfo/python-list
e lines of
something that could translate between the world of the Traits package
(http://code.enthought.com/traits/), and XSD/DTD/XML. Has anyone done
this before?
Thanks in advance, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
_val
... return (borg_var_inc, borg_var_dec)
...
>>> up1, dn1 = fun_borg_var()# get an inc/decrementer
>>> up1(0)
0
>>> up1()
1
>>> up1()
2
>>> dn1()
1
>>> dn1()
0
>>> dn1()
-1
>>> up2, dn2 = fun_borg_var()# get another inc/decrementer
>>> up2(0) # looks like the same _n
-1
>>> up2(3)
2
>>> up1(3)
5
>>>
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
unction or not: just look for
the ().
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
101 - 200 of 675 matches
Mail list logo