nt is that there
seems to be no support for nonlocal in eval/exec (unless, trivially,
nonlocal==global).
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 11, 8:48 am, Terry Reedy wrote:
> On 8/11/2011 3:19 AM, Paddy wrote:
>
> > We can access nonlocal variables in a function, but if we were to eval/
> > exec the function we cannot set up a nested stack of evironment dicts.
> > We are limited to just two: global an
t;
>>> fsf1 = partial(fs, f=f1)
>>> fsf1(s)
Traceback (most recent call last):
File "", line 1, in
fsf1(s)
TypeError: fs() got multiple values for keyword argument 'f'
>>> # BUT
>>> fsf1(s=s)
[0, 2, 4, 6]
>>>
Would someone help?
- Thanks in advance, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
P.S: Python 3.2!
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Ian, Benjamin, and Steven.
I now know why it works as it does.
Thinking about it a little more, Is it reasonable to *expect* partial acts as
it does, rather than this way being an implementation convenience? (That was
written as a straight question not in any way as a dig).
I had though
Aha!
Thanks Ian for this new snippet. It is what I will use for my current example.
(But please see my third posting on this too).
--
http://mail.python.org/mailman/listinfo/python-list
In an extended case when you try and capture how a function works over a range
of inputs, you might want to not assume some relationship between input size
and time, as this mnight limit your ability to change algorithms and still have
acceptable performance.
I.e. instead of this:
input_range
On Tuesday, April 5, 2011 2:16:07 AM UTC+1, harrismh777 wrote:
> Steven D'Aprano wrote:
> > I prefer to consider Python 2.7 and Python 3.x as different dialects of
> > the same language. There are a very few handful of incompatibilities,
> > most of which can be automatically resolved by the 2to3 f
I thought along these lines:
It is an augmented ASSIGNMENT. (It even has an equals sign in it).
tuples are immutable so you should not be able to assign to one of
its elements.
- So there is no problem for me - I shouldn't be messing with an
element of an
immutable type!
- Cheers,
Hi Bearophile,
Nah, you don't want to change 'em. I can remember 'em just fine :-)
--
http://mail.python.org/mailman/listinfo/python-list
If you mean missing out some of the libraries then that would be
different to missing out core functionality sucjh as generators or list
expressions,...
In general, if the end task is not to present the world with a new
programming language then it's usually best to choose from the
available, supp
Would this help?
'''
>>> pp(name2ranges)
{'a': [[5, 12], [27, 89], [120, 137]],
'b': [[6, 23], [26, 84], [200, 222]],
'c': [[2, 22], [47, 60], [67, 122]]}
>>> names4val(28)
['a', 'b']
>>> names4val(11)
['a', 'c', 'b']
>>> names4val(145)
[]
>>>
'''
from pprint import pprint as pp
name2ranges =
Albert
Their "Extract the title and author elements from every item in the
rss.channel tag" example is also impressive.
Looks like an innovative new shell.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am using gvim 6.4 which has Python colorising, and
The menu tools->folding->fold method->indent
:help folding
May give you more info.
Cheers, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
I would consider
t = ([1,2], [3,4])
to be assigning a tuple with two list elements to t.
The inner lists will be mutable but I did not know you could change the
outer tuple and still have the same tuple object.
- Pad.
--
http://mail.python.org/mailman/listinfo/python-list
Google is your freind.
Try searching for:
python text wrapping
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
etary languages with this feature, here
is an example written in Cadence's Specman 'e' language:
http://www.asic-world.com/specman/specman_one_day2.html
Cheers, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Sadly, its not a solution that I'm after, but a particular toolkit that
can be used for solving that type of problem.
- Pad.
--
http://mail.python.org/mailman/listinfo/python-list
onsistant with simple function definitions.
- Cheers, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
he replies. Rather like dropping a stone in the river and watching
pythonistas return c.l.p. to its normal, helpful, and polite norm.
Fascinating.
I only hope that if thats the case, then they should post their
findings here.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
L.OL :-)
--
http://mail.python.org/mailman/listinfo/python-list
Do you know anyone who has dropped LAMP for a proprietary Web solution?
Or vice versa?
Know any sys-admins that have dropped their use of scripting languages
for something else?
What are the alternatives that are supposedly driving scripting
languages out?
- I'm unconvinced.
--
http://mail.pytho
Hi,
I read a blog entry by GVR on interfaces in which he mentioned that you
had to be able to state the type signature of, say, a function.
That got me thinking along the lines of:
If you have some typical data, then transform it into a string
showing
its sub-types.
Could not a regular expre
Try this:
>>> a,b,c = list('tab'),list('era'),list('net')
>>> a,b,c
(['t', 'a', 'b'], ['e', 'r', 'a'], ['n', 'e', 't'])
>>> tuple(((x,y,z) for x,y,z in zip(a,b,c)))
(('t', 'e', 'n'), ('a', 'r', 'e'), ('b', 'a', 't'))
>>>
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
example at work and circulated it amongst the
resident perl mongers. - Gosh it fealt good :-)
So, How do I get feedback from Praxis, Do they already read
comp.lang.py?
Cheers, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Hmm, They seem to have reorganised things.
As I write, the main article starts here:
http://www.spectrum.ieee.org/sep05/2164
With the sidebar here:
http://www.spectrum.ieee.org/sep05/2164/extsb1
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
ts of their flow.
Maybe they don't see scripting as part of their flow, but as merely
occasional 'duct tape'?
I did find an email address on the page you specified and have invited
Praxis to join in on this thread, or comment on Python in general.
- Paddy.
--
http://mail.python.
.S. I like your suggestion about pycon, but I have no reply from
anyone at Praxis after emailing them yesterday.
- Cheers, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
The article states that their method calls for them to have much more
than normal access to many more people in the clients organisation than
is normal; from the CEO to the receptionist.
The specification stage can take a year without the customer seeing a
line of code.
And they deliberately "write
How about posting example data and results?
--
http://mail.python.org/mailman/listinfo/python-list
generated).
Thanks again for the interest,
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I got tripped up on the way eval works with respect to modules and
so wrote a test.
It seems that a function carries around knowledge of the globals()
present
when it was defined. (The .func_globals attribute)?
When evaluated using eval(...) the embedded globals can be overridden
with
the one
I have had no reply so on revisiting this I thought I would re-submit
it and point out that there is a question way down at the end :-)
Thanks.
= Original Post =
Hi,
I got tripped up on the way eval works with respect to modules and
so wrote a test.
It seems that a function carries arou
was first implimented that way
and no-one has submitted a patch of course.
Could someone clue me in?
Ta, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Leif wrote:
" If globals were deeply substituted when using eval, the program would
presumably print "42\n24", which would be far from intuitive. If you
limit the deep substitution to functions in the same module, you're
creating a confusing special case. "
I guess I need outside opinions on what
It is usually clearer to explicitely return values that are changed by
a function and re-assign it to the same variable,
x=something1
a = something2
def f1(s,t):
# do something with t,
# do something to s
return s
a = f1(a,x)
Be aware however that you can wrap 'a' in a list for the same eff
Hmm,
going 'the other way', you are allowed an extra , but you can't have
(,) as the empty tuple.:
>>> (1,2,)
(1, 2)
>>> (1,)
(1,)
>>> (,)
...
Traceback ( File "", line 1
(,)
^
SyntaxError: invalid syntax
-- Pad.
--
http://mail.python.org/mailman/listinfo/python-list
Try searching for: 'python aspect-oriented' as aspect oriented
programming is about modifying existing class-methods (not exactly
functions which is what you asked for).
You might also do a search for "AOP considered harmful"
http://www.infosun.fmi.uni-passau.de/st/papers/EIWAS04/stoerzer04aop_harm
Hi, I do agree with
Raymond H. about the relative merits of cmp= and key= in
sort/sorted, but I decided to also not let natural uses of cmp= pass silently.
In answering this question, http://stackoverflow.com/a/26850434/105
On Monday, 10 November 2014 19:44:39 UTC, Ian wrote:
> On Mon, Nov 10, 2014 at 12:19 PM, Peter Otten wrote:
> > I'm not sure this works. I tried:
>
> Here's a simpler failure case.
>
> >>> ineq = """f2 > f3
> ... f3 > f1"""
>
> [Previously posted code elided]
>
> >>> greater_thans
> set([('f3
On Monday, 10 November 2014 18:45:15 UTC, Paddy wrote:
> Hi, I do agree with
>Raymond H. about the relative merits of cmp= and key= in
> sort/sorted, but I decided to also not let natural uses of cmp= pass
On Tuesday, 11 November 2014 06:37:18 UTC, Ian wrote:
> On Mon, Nov 10, 2014 at 8:09 PM, Paddy wrote:
> > On Monday, 10 November 2014 18:45:15 UTC, Paddy wrote:
> >> Hi, I do agree with
> >> Ra
On Tuesday, 11 November 2014 09:07:14 UTC, Ian wrote:
> On Tue, Nov 11, 2014 at 12:44 AM, Paddy wrote:
> > Thanks Ian. The original author states "...and it is sure that the given
> > inputs will give an output, i.e., the inputs will always be valid.", which
> >
On Tuesday, 11 November 2014 18:07:27 UTC, Ian wrote:
> The example that I posted is one that I recall being brought up on
> this list in the past, but I don't have a link for you.
THanks Ian for your help in this.
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, 25 February 2015 00:08:32 UTC, Chris Angelico wrote:
> On Wed, Feb 25, 2015 at 10:50 AM, Skip Montanaro
> wrote:
> > Even if/when we get to the point where machines can hold an array of
> > 2**49 elements, I suspect people won't be using straight Python to
> > wrangle them.
>
<>
>
Having just seen Raymond's talk on Beyond PEP-8 here:
https://www.youtube.com/watch?v=wf-BqAjZb8M, it reminded me of my own recent
post where I am soliciting opinions from non-newbies on the relative
Pythonicity of different versions of a routine that has non-simple array
manipulations.
The bl
On Saturday, 18 April 2015 03:34:57 UTC+1, Ian wrote:
> On Fri, Apr 17, 2015 at 7:19 PM, Paddy wrote:
> > Having just seen Raymond's talk on Beyond PEP-8 here:
> > https://www.youtube.com/watch?v=wf-BqAjZb8M, it reminded me of my own
> > recent post where I am so
On Saturday, 18 April 2015 08:09:06 UTC+1, wxjm...@gmail.com wrote:
> Le samedi 18 avril 2015 03:19:40 UTC+2, Paddy a écrit :
> > Having just seen Raymond's talk on Beyond PEP-8 here:
> > https://www.youtube.com/watch?v=wf-BqAjZb8M, it reminded me of my own
> > recent
That reminds me of TclTutor:
http://www.msen.com/~clif/TclTutorTour.html
TclTutor is a great Tk application that teaches Tcl/Tk by having all
the lessons and examples set up waiting in the app. The examples can be
edited/fixed and re-executed.
I still bring up TclTutor when I delve into Tcl pro
So, testosterone wins again!
We get to boast:
"Mine's smaller than your's"
Lets wait for Pythonic to go to bed, then sneak downstairs, go to that
tripple-X rated 'shortest solutions' website, and 'whack-off' some
solutions.
Unghhh, my solution... its coming!!!
Well don't forget to clean up be
t more thought, the intermediate calculation of tmp can be
removed with a
little loss in clarity though, to give:
>>> answer = [ val for val in set(ref) for x in range(min(lst.count(val),
>>> ref.count(val)))]
>>> answer
[2, 2, 4]
- Cheers, Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Quenton Bonds wrote:
> Hello
> I am trying to understand the abilities and limitation of creating an
> instance. First I will give you my understanding then please steer me
> in the right direction.
>
> Abiities
> 1. The two ways to create an instance is def method(self) &
> __int__(self, other,
or1.upstream)
# ...
With a bit more effort you can create component and link factories
that will name instances with the variable they are assigned to
without having to put that information in twice.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
otal Privacy via Encryption =
It is hard to answer your "Why doesn't this wirk question|", and it
must be hard to approach Python as a new user by looking at the
grammer.
Why not try looking at examples, trying them out in the Idle IDE, and
only then compare your wor
6XW473VSflcJ:www.mindview.net/WebLog/log-0053+%2B%22duck+typing%22+%2B+%22static+typing%22+%2Bpython&hl=en&gl=uk&ct=clnk&cd=3&client=firefox-a
It seems that the latent or duck typing, used in dynamic languages is
counter-intuitve to those from a static typing background.
Nevertheless, it does work, and work well.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
e creator of the language
> himself working there.
>
> 3. Python emphasizes readability instead of cleverness/conciseness.
>
> 4. What else? I haven't tried RoR so I can't argue meaningfully on
> whether using Django will put us at an advantage.
>
> Can you help me with my argument? Meanwhile I think I'll give RoR a try
> as well.
>
> Thank you,
> Ray
Ruby does not have doctest :-)
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
ld and Release
> MontaVista Software
Carl,
OS writers provide much more tools for debugging, tracing, changing
the priority of, sand-boxing processes than threads (in general) It
*should* be easier to get a process based solution up and running
andhave it be more robust, when compared to a threaded s
__(self, p):
return self.value[p]
obj1 = C1(5)
obj2 = C1(5)
io1 = iter(obj1)
io2 = iter(obj2)
print "obj1 pre loop",[r.param for r in obj1.value]
try:
while 1:
io1.next().param += io2.next().param
except StopIteration:
pass
print "obj1 post loop",[r.param for r in obj1.value]
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Paddy wrote:
> Pierre Thibault wrote:
> > Hello!
> >
> > I am currently trying to port a C++ code to python, and I think I am stuck
> > because of the very different behavior of STL iterators vs python
> > iterators. What I need to do is a simple arithmetic opera
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 in
> similar circumstances.
>
> Th
Laurent Rahuel wrote:
> Hi,
>
> I have a much to smart problem for my brain.
>
> Here is the deal :
>
> I got a metaclass named Foo
>
> Then I got two others classes:
>
> class Bar(Foo):
> pass
>
> class Baz(Foo):
> pass
>
> I know how to add some attrs, methods to Bar and Baz when
orator: initialises function attributes"
func.__dict__.update(kw)
return func
return func2
def accumulator(n):
""" return an accumulator function that starts at n
>>> x3 = accumulator(3)
>>> x3.acc
3
>>> x3(4)
release of pyparsing, and
> also online at the pyparsing.wikispaces.com - but I have no graph-generating
> tools to go the next step: generation of the railroad diagrams (in something
> more legible/appealing than ASCII-art!).
>
> Anyone interested in helping complete this last step?
>
> Thanks,
> -- Paul
I googlled and got these:
http://www.informatik.uni-freiburg.de/~thiemann/haskell/ebnf2ps/
http://www.antlr.org/share/1107033888258/SDG2-1.5.zip
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Paddy wrote:
> Paul McGuire wrote:
> > Back in the mid-90's, Kees Blom generated a set of railroad syntax diagrams
> > for Python
> > (http://python.project.cwi.nl/search/hypermail/python-1994q3/0286.html).
> > This pre-dates any Python awareness on my part, but I
the ability to choose between hardware supported float
s? e.g. float and double precision?
Or to be able to just interrogate the float implementation so your prog
can adjust to whatever implementation it is running under?
Something like:
assert float.mant_dig > 20
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
I just found this:
http://www.cs.princeton.edu/~dpw/popl/06/Tim-POPL.ppt
And thought of you... :-)
called "The Next Mainstream Programming Languages", Tim Sweeney of Epic
Games presents on problems that game writers see and muses on possible
solutions.
- Pad.
--
http://mail.python.org/mailman
[EMAIL PROTECTED] wrote:
> Paddy:
> > Or do you mean the ability to choose between hardware supported float
> > s? e.g. float and double precision?
>
> No, I mean just having the ability to ask the float (his attribute)
> what are the max and min values it can represent, e
Paddy wrote:
> [EMAIL PROTECTED] wrote:
> > Paddy:
> > > Or do you mean the ability to choose between hardware supported float
> > > s? e.g. float and double precision?
> >
> > No, I mean just having the ability to ask the float (his attribute)
> > wha
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> Paddy <[EMAIL PROTECTED]> wrote:
> .
> [substantial thread
> with many serious
> alternatives]
> .
>
Andre Meyer wrote:
> Am I missing something here? What is the preferred pythonic way of
> implementing singleton elegantly?
>
> Thanks for your help
> André
Hi Andre,
You might also google for
python borg pattern
As a discussion on the 'borg' design pattern might be informative.
- Pad.
--
ht
& keyb
common_eq = set(k for k in _common if a[k] == b[k])
common_neq = _common - common_eq
If you now simple set arithmatic, it should read OK.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
cleanest way to do it? (I am sure you will
> > come up with ways that astonishes me :=) )
> >
>
> Paddy has already pointed out a necessary addition to your requirement
> definition: common keys with different values.
>
> Here's another possible addition: you say
x27;: 'C', 'B': 'B'},
4: {'4': '4'}}
b ={2: {'2': '2'}, 3: {'C': 'D', 'B': 'B', 'E': 'E'}, 5: {'5': '5'}}
comp_result =
{'A excl keys': set([1, 4]),
'B excl keys': set([5]),
'Common & eq': set([2]),
'Common keys neq values': [(3,
{'A excl keys': set(['A']),
'B excl keys': set(['E']),
'Common & eq': set(['B']),
'Common keys neq values': set(['C'])})]}
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> OriginalBrownster wrote:
> > Hi there:
> >
> > I know this probably is a very easy thing to do in python, but i wanted
> > to compare 2 lists and generate a new list that does not copy similar
> > entries. An example below
> >
> > list= ["apple", "banana", "grape"]
> > l
ce the double entry would not show up?
>
> Is there a way to do this??
>
> Stephen
This solution uses sets; removes all duplicates and is order
preserving.
Remove the outer sorted wrapper if the order need not be preserved.
>>> lst= ["apple", "banana", "
ou really do need to browse the
Library Reference Docs.
http://docs.python.org/lib/
You might also want to take a look at this page on the wiki:
http://wiki.python.org/moin/PerlPhrasebook
Of course, this is as well as going through whatever Python tutorial
you are following.
Have fun,
- Padd
m strings [use ''.join(seq) instead]
>>>
Well, after all the above, there is a question:
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 strin
Sybren Stuvel wrote:
> Paddy enlightened us with:
> > Well, after all the above, there is a question:
> >
> > Why not make sum work for strings too?
>
> Because of "there should only be one way to do it, and that way should
> be obvious". There are alrea
Sybren Stuvel wrote:
> Paddy enlightened us with:
> > Well, after all the above, there is a question:
> >
> > Why not make sum work for strings too?
>
> Because of "there should only be one way to do it, and that way should
> be obvious". There are alrea
Fredrik Lundh wrote:
> Paddy wrote:
>
> > Here is where I see the break in the 'flow':
> >
> >>>> 1+2+3
> > 6
> >>>> sum([1,2,3], 0)
> > 6
> >>>> [1] + [2] +[3]
> > [1, 2, 3]
> >>>> sum([[1
Georg Brandl wrote:
> Paddy wrote:
<>
> > I get where you are coming from, but in this case we have a function,
> > sum, that is not as geeral as it could be. sum is already here, and
> > works for some types but not for strings which seems an arbitrary
> > l
Paul Rubin wrote:
> "Paddy" <[EMAIL PROTECTED]> writes:
> > Pythons designers seem to know and apply the advantages of having fewer
> > 'themes' that can be applied with less constraints I am curious about
> > such a constraint on sum.
>
> The
Rhamphoryncus wrote:
>
> It's worthwhile to note that the use of + as the concatenation operator
> is arbitrary. It could just have well been | or &, and has no
> relationship with mathematically addition.
The effect of the string concatenation operator is only secondary.
Secondary to the use o
of information on what matches.
Try it.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Carl Banks wrote:
>
> and, you know, if you really want to concatenate strings with sum, you
> can
>
> class noopadd(object):
> def __add__(self,other):
> return other
>
> sum(["abc","def","ghi"],noopadd())
;-)
- Pad.
--
http://mail.python.org/mailman/listinfo/python-list
gord wrote:
> As a complete novice in the study of Python, I am asking myself where this
> language is superior or better suited than others. For example, all I see in
> the tutorials are lots of examples of list processing, arithmetic
> calculations - all in a DOS-like environment.
>
> What is pa
tp://pyyaml.org/wiki/PyYAML
http://jyaml.sourceforge.net/
http://www.yaml.org/
http://www.json.org/
http://www.json.org/java/
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
hanumizzle wrote:
> On 5 Oct 2006 22:25:58 -0700, Paddy <[EMAIL PROTECTED]> wrote:
>
> > You might try picking the data with a different pickle formatter that
> > your Java can use. Maybe an XML pickler
> > (http://www.gnosis.cx/download/Gnosis_Utils.More/Gnosis_Uti
Paddy wrote:
> hanumizzle wrote:
> > On 5 Oct 2006 22:25:58 -0700, Paddy <[EMAIL PROTECTED]> wrote:
> >
> > > You might try picking the data with a different pickle formatter that
> > > your Java can use. Maybe an XML pickler
> > > (http://www.g
Fabian Braennstroem wrote:
> Hi,
>
>
> I actually want to extract the lines with the numbers, write
> them to a file and finally use gnuplot for plotting them. A
> nicer and more python way would be to extract those numbers,
> write them into an array according to their column and plot
> t
advance(bodies, 0.01, n)
==
This I like. It points to areas of python where maybe we should be
adding to the standard library whilst also showing off the cream of the
non-standard libraries out their.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
line 1, in ?
TypeError: unsupported operand type(s) for ^: 'str' and 'int'
$
Please don't give up on Python. It *is* different to Perl.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
nd finally: Lets 'big-up' Python:
http://www.paulgraham.com/pypar.html
I hope you enjoy Python.
All the best, Paddy.
P.S. maybe your High school might be interested in teaching Python as a
first language rather than Java?
http://www.oreilly.com/pub/a/oreilly/frank/elkner_0300.htm
(0, 2, 1)
(0, 2, 2)
Raised exception Outer
>>> skip_loops(y2=2)
(0, 0, 0)
(0, 0, 1)
Raised exception Inner
(0,)
(1, 0, 0)
(1, 0, 1)
Raised exception Inner
(1,)
(2, 0, 0)
(2, 0, 1)
Raised exception Inner
(2,)
>>>
- Paddy.
P.S. Welcome to Python!
--
http://mail.python.org/mailman/listinfo/python-list
hg wrote:
> Paddy wrote:
> > P.S. Welcome to Python!
> >
> How about a thread on GOTOs ? ;-)
I'm trying to be nice on c.l.p.
- Mind you, I do have that rant as part of my blog:
http://paddy3118.blogspot.com/2006/03/whats-wrong-with-perl.html
;-)
- Paddy.
--
http://
werty wrote:
> Apples/oranges ? programmers are making very little $$ today .
>Thats software ! No one is makin money on obsolete Forth ,
> so why a comparisom ?
>
> Ultimately the best OpSys will be free and millions of lines of code
> obsoleted . Because no one can protect intellectu
, does any
> one know how to do it?
I presume there is only one thread of execution here, so the file being
execfiled would have to recognise an error condition and raise an
un-caught exception.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney wrote:
> "Chris" <[EMAIL PROTECTED]> writes:
>
> > Oh, ok that explains it. Is that why my 16-bit calculator gives me
> > 0?
>
> Your calculator is probably doing rounding without you asking for it.
>
> Python refuses to guess what you want, and gives you the information
> available.
>
kelin,[EMAIL PROTECTED] wrote:
> Hello,
>
> Now I 'm learning python to do testing jobs, and want to use it in
> TestMaker.
> The problem is: I don't know how to use python in TestMaker.
> Just write python program in it or call .py files in it?
> I am really new about it and need some help.
>
>
to:", sub0,"and:", sub1
...
tpl provides this when iterated over: (0, 1)
each element unpacks to: 0 and: 1
tpl provides this when iterated over: (10, 11)
each element unpacks to: 10 and: 11
tpl provides this when iterated over: (20, 21)
each element unpacks to: 20 and: 21
>>> for sub0, sub1 in tpl:
... print "each element of tuple unpacked immediately to:",
sub0,"and:", sub1
...
each element of tuple unpacked immediately to: 0 and: 1
each element of tuple unpacked immediately to: 10 and: 11
each element of tuple unpacked immediately to: 20 and: 21
>>>
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 675 matches
Mail list logo