"Mr.SpOOn" wrote in message
news:[email protected]...
> In [13]: ('b3' and '5') in l or ('3' and 'b3') in l
> Out[13]: True
For anything more than the simplest cases, you might want use sets.
That might be the correct data type from the start, depending on
whe
On 22 Nov, 00:07, MRAB wrote:
> Steve Howell wrote:
> > I have been writing some code that parses a mini-language, and I am
> > running into what I know is a pretty common design pattern problem,
> > but I am wondering the most Pythonic way to solve it.
>
> > Basically, I have a bunch of really si
On Nov 24, 2:45 am, geremy condra wrote:
> On Mon, Nov 23, 2009 at 9:10 PM, geremy condra wrote:
> > On Mon, Nov 23, 2009 at 9:03 PM, geremy condra wrote:
> >> On Mon, Nov 23, 2009 at 7:05 PM, Paul Miller
> >> wrote:
> >>> I was wondering if there were any neat tools (like for instance,
> >>> s
Gerhard Häring writes:
> Rhodri James wrote:
>> On Mon, 23 Nov 2009 19:20:27 -, NiklasRTZ wrote:
>>
>>> Dear experts,
>>> Since no py IDE I found has easy hg access. IDEs PIDA and Eric claim
>>> Mercurial support not found i.e. buttons to clone, commit and push to
>>> repositories to define
On Jan 31, 6:15 pm, [email protected] wrote:
> I'm trying to read some data from standard input, what I'm actually
> trying to do is process some date pasted in using the mouse cut and
> paste on a Linux box (xubuntu 9.10) in a terminal window.
>
> First attempts failed so I'm now trying the trivi
Am Tuesday 23 February 2010 09:07:43 schrieb Krister Svanlund:
> On Tue, Feb 23, 2010 at 1:01 AM, Edward A. Falk
wrote:
> > You mean it's not?
> >
> > --
> > -Ed Falk, [email protected]
> > http://thespamdiaries.blogspot.com/
>
> Javas popularity was very much a product of its
On Feb 25, 2:03 pm, fat bold cyclop wrote:
> > Both are not equal, so the comparison returns an arbitrary result in Py2.
>
> Thanks, Stefan. If I understand you correctly the comparison is not
> valid.
> But I wonder if there is any logic behind this (in 2.x).
> Is it possible to predict result of
"Andreas Waldenburger" wrote in message
news:[email protected]...
>> Reminiscent of:
>>
>> mov AX,BX ; Move the contents of BX into AX
>>
> Well, there might be some confusion there as to what gets moved where,
> wouldn't you say?
Depends on what assembler
"Matt Mitchell" wrote in message
news:[email protected]...
> My initial idea was to make a list of all the different
> ways "project" has been capitalized in my repo and try each one. The
> code looks like this:
I would use pysvn.Client.list to get a list of fi
LinkedIn
I'd like to add you to my professional network on LinkedIn.
- RICHARD MOORE
Confirm that you know RICHARD MOORE
https://www.linkedin.com/e/isd/1117171902/jlHq1JKw/EML-invg_56/
--
(c) 2010, LinkedIn Corporation--
http://mail.python.org/mailman/listinfo/p
LinkedIn
I'd like to add you to my professional network on LinkedIn.
- RICHARD MOORE
Confirm that you know RICHARD MOORE
https://www.linkedin.com/e/isd/1117171902/jlHq1JKw/EML-invg_56/
--
(c) 2010, LinkedIn Corporation--
http://mail.python.org/mailman/listinfo/p
"Ed Keith" wrote in message
news:[email protected]...
> That has always puzzled me to. ETX and EOT were well established,
> why no use one of them? I'd love to know what they were thinking.
It goes back to ancient PDP operating systems, so may well
predate Un
increase the public body of game tools, code and expertise,
- Will let a lot of people actually finish a game, and
- May inspire new projects (with ready made teams!)
Come along and play, it's lots of fun :)
Richard
--
http://mail.python.org/mailman/listinfo/python-list
"C. Benson Manica" wrote in message
news:98375575-1071-46af-8ebc-f3c817b47...@q23g2000yqd.googlegroups.com...
>The strings come from the same place, i.e. they're exclusively
> normal ASCII characters.
In this case then converting them to/from UTF-8 is a no-op, so
it makes no difference at all.
"Joel Pendery" wrote in message
news:[email protected]...
>> y_diff = y_diff-H
>
> Syntaxerror: Non-ASCII character '\x96' in file on line 70, but no
> encoding declared.
That's likely an en-dash, not a minus sign.
--
http://mail.python.org/ma
I am trying to write text into a windows edit
control using python. it seems to write to every control i try except
the edit box not sure if this is a security measure or not. here is my
code any help please.
import os,sys,subprocess,time
from subprocess import *
from os import *
from cty
Hello,
are there any python bindings for libpst?
http://www.five-ten-sg.com/libpst/
https://alioth.debian.org/projects/libpst/
Kind Regards
Richi
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 22, 11:38 am, Ulrich Eckhardt
wrote:
> Hi!
>
> I'm writing tests and I'm wondering how to achieve a few things most
> elegantly with Python's unittest module.
>
> Let's say I have two flags invert X and invert Y. Now, for testing these, I
> would write one test for each combination. What I
Hi all,
The Melbourne Python Users Group will be meeting 6PM next Monday,
the 6th of December at RMIT University.
For details see http://bit.ly/mpug.
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 13, 10:02 am, Alain Ketterlin
wrote:
> justin writes:
> > Suppose I have [1,2,3,4,5], then there are many ways of making
> > clustering.
> > Among them, I want to pair up terminals until there is only one left
> > at the end.
>
> Are you trying "ascending hierarchical clustering" by any ch
On Jan 13, 3:59 pm, Alain Ketterlin
wrote:
> Richard Thomas writes:
> > On Jan 13, 10:02 am, Alain Ketterlin
> >> def clusterings(l):
> >> if len(l) == 1:
> >> print repr(l)
> >> else:
> >> n = len(l)
> >>
I'm trying to create an image for use in Tkinter. If I understand the
PIL documentation correctly, I first need to import Image, then
create an instance of the Image class and call 'open' (this according
to the documentation). When I try to do this using the model in the
documentation, I get:
Trac
On Mon, 07 Feb 2011 17:28:45 -0500, Corey Richardson
wrote:
>On 02/07/2011 05:27 PM, Richard Holmes wrote:
>> I'm trying to create an image for use in Tkinter. If I understand the
>> PIL documentation correctly, I first need to import Image, then
>> create an instance o
On Tue, 08 Feb 2011 09:47:32 +1100, Ben Finney
wrote:
>Richard Holmes writes:
>
>> I'm trying to create an image for use in Tkinter. If I understand the
>> PIL documentation correctly, I first need to import Image, then
>> create an instance of the Image class an
On Tue, 08 Feb 2011 10:56:52 +1100, Ben Finney
wrote:
>Richard Holmes writes:
>
>> Thanks, Ben. It turns out that I imported both Image and Tkinter and
>> Tkinter has an Image class that masked the Image class in the Image
>> module. I solved the problem by moving the
rease the public body of game tools, code and expertise,
- Will let a lot of people actually finish a game, and
- May inspire new projects (with ready made teams!)
Richard
http://pyweek.org/12/
--
http://mail.python.org/mailman/listinfo/python-list
following the conference proper.
International guests should note that Kiwi PyCon is to run on the
following weekend, making it a great opportunity to attend a couple of
awesome Down Under conferences and hopefully do some sprinting with
the locals.
Richard Jones
http://pycon-au.org
On Feb 16, 2:23 am, [email protected] wrote:
> How can I do something like this in python:
>
> #!/usr/bin/python3.1
>
> class MyNumbers:
> def __init__(self, n):
> self.original_value = n
> if n <= 100:
> self = SmallNumers(self)
> else:
> self = BigNumbers(self)
>
> clas
d out more go to the official Call for Proposals page here:
http://pycon-au.org/2011/conference/proposals/
The deadline for proposal submission is the 2nd of May.
See you in Sydney in August!
Richard Jones
PyCon AU Program Chair
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 5, 4:40 pm, Roald de Vries wrote:
> Dear all,
>
> PEP 245 and 246 about interfaces for python are both rejected for
> 'something much better' (GvR in 246's rejection notice). Does anybody
> know what this is? I am *very* curious!
>
> Kind regards, Roald
Given that was in 2001, probably
Hello,
i want to parse this String:
version 3.5.1 {
$pid_dir = /opt/samba-3.5.1/var/locks/
$bin_dir = /opt/samba-3.5.1/bin/
service smbd {
bin = ${bin_dir}smbd -D
pid = ${pid_dir}smbd.pid
}
service nmbd {
b
Am Wednesday 07 April 2010 10:52:14 schrieb Chris Rebert:
> On Wed, Apr 7, 2010 at 1:37 AM, Richard Lamboj
wrote:
> > i want to parse this String:
> >
> > version 3.5.1 {
> >
> > $pid_dir = /opt/samba-3.5.1/var/locks/
> > $bin_dir = /opt/samba
f May.
See you in Sydney in June!
Richard Jones
PyCon AU Program Chair
--
http://mail.python.org/mailman/listinfo/python-list
At the moment i have less time, so its painful to read about parsing, but it
is quite interessting.
I have taken a look at the different Parsing Modules and i'am reading the
Source Code to understand how they Work. Since Yesterday i'am writing on my
own small Engine - Just for Fun and understa
On Apr 8, 5:46 pm, Tobiah wrote:
> I'm having a difficult time with this. I want
> to display a continuous range of hues using HTML
> hex representation (#RRGGBB). How would I go
> about scanning through the hues in order to
> make a rainbow?
>
> Thanks,
>
> Toby
Look at the colorsys module.
h
gt;
In Kind: Linux Australia <http://linux.org.au/>
Thanks to our sponsors for helping make the event a reality.
Richard Jones
PyCon Australia 2010
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
is there a way to get the GUID from a Network Device?
Kind Regard,
Richi
--
http://mail.python.org/mailman/listinfo/python-list
Am Monday 26 April 2010 10:14:24 schrieb Tim Golden:
> On 26/04/2010 09:06, Richard Lamboj wrote:
> > is there a way to get the GUID from a Network Device?
>
> Are you talking about the MAC address? If so, here's
> one way:
>
>
> i
Hello,
is there a way to rename a subkey?
Kind Regards,
Richi
--
http://mail.python.org/mailman/listinfo/python-list
u.org/cfp
As always, please pass this message on to people you feel will find it
interesting.
Richard Jones
PyCon Australia 2010
http://pycon-au.org/
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
if i want to read, write a key and set a value, does i only need to set
KEY_WRITE, or does i need to set KEY_READ, KEY_WRITE and KEY_SET_VALUE?
This questions is related to the OpenKey Function.
http://docs.python.org/py3k/library/winreg.html <- The other Access modes are
missing in th
Hello,
is there any way to get the name from the actual called function, so that the
function knows its own name?
Kind Regards,
Richi
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
i want to add functions to an instance of a class at runtime. The added
function should contain a default parameter value. The function name and
function default paramter values should be set dynamical.
Kind Regards,
Richi
--
http://mail.python.org/mailman/listinfo/python-list
Am Thursday 29 April 2010 09:59:22 schrieb Xavier Ho:
> On Thu, Apr 29, 2010 at 5:55 PM, Richard Lamboj
wrote:
> > Hello,
> >
> > i want to add functions to an instance of a class at runtime. The added
> > function should contain a default parameter value. The fun
Am Thursday 29 April 2010 10:13:01 schrieb Peter Otten:
> Richard Lamboj wrote:
> > i want to add functions to an instance of a class at runtime. The added
> > function should contain a default parameter value. The function name and
> > function default paramter values sh
Hello,
i want catch the following events:
- registry has chanced
- file has chanced
- outgoing network connection
- programm start
and i want to be able to allow, or deny this "requests".
Kind Regards
Richi
--
http://mail.python.org/mailman/listinfo/python-list
Fort)
... please feel free to suggest a topic - anything cool you've
discovered lately.
And I'm sure there'll be some talk about PyCon Australia as well!
Richard
--
http://mail.python.org/mailman/listinfo/python-list
Registration is open and the Early Bird tickets are running out.
Register here: http://pycon-au.org/reg
We offer two levels of registration for PyCon Australia 2010:
Full (Early Bird) - $165
This is the registration rate for regular attendees. We're
offering a limited Early Bird rate for the
Hello,
what should i take:
- nested functions:
class MyClass(object)
def blah(self):
def blub(var1, var2):
do something...
blub(1, 5)
or
class MyClass(object)
def blah(self):
def _blub(var1, var2):
do something...
_blub(1, 5)
- "private" functions:
class MyCl
Am Thursday 06 May 2010 12:02:47 schrieb Steven D'Aprano:
> On Thu, 06 May 2010 11:24:49 +0200, Richard Lamboj wrote:
> > Hello,
> >
> > what should i take:
> > - nested functions:
> > class MyClass(object)
> > def blah(self):
> >
Hello,
I have a question about importing python modules.
I have modul package, with submodules. So how can a submodul access a modul
that is on level upper?
Is there something like "import ../../blah"? I don't mean something like
this: "import bla.blub.moep"
Kind Regards,
Richi
--
http://
Am Friday 07 May 2010 13:50:15 schrieb Jean-Michel Pichavant:
> Richard Lamboj wrote:
> > Hello,
> >
> > I have a question about importing python modules.
> >
> > I have modul package, with submodules. So how can a submodul access a
> > modul that is on
Hello,
i want to inherit from a data type. How can i do this? Can anyone explain more
abou this? How knows python that it is a float, or a string?
Kind Regards
Richi
--
http://mail.python.org/mailman/listinfo/python-list
Am Tuesday 11 May 2010 10:47:35 schrieb Ulrich Eckhardt:
> Richard Lamboj wrote:
> > i want to inherit from a data type. How can i do this? Can anyone explain
> > more abou this?
>
> Other than in e.g. C++ where int and float are special types, you can
> inherit from them
Am Tuesday 11 May 2010 11:38:42 schrieb Ulrich Eckhardt:
> Richard Lamboj wrote:
> > "How knows python that it is a float, or a string?" Sorry this was bad
> > expressed. I want to create a new data type, which inherits from float. I
> > just know the "dir"
Am Tuesday 11 May 2010 20:16:50 schrieb Terry Reedy:
> On 5/11/2010 7:51 AM, Richard Lamboj wrote:
> > I just want to test what is possible with python and what not. There is
> > no problem that i need to solve.
> >
> > This is what i'am searching for:
>
Hi all,
The program for PyCon Australia 2010, to be held at the Sydney
Masonic Center over the weekend of June 26 and 27, has been posted.
View the full list of presentations and the schedule at:
http://pycon-au.org/2010/conference/
Register here:
http://pycon-au.org/reg
Richard
For this kind of problem you should avoid all that stringification. I
find it best to deal with sequences of digits of a fixed length and go
from there. For example:
def count1(m, n, cache={}):
"""Number of digit sequences of length `n` summing to `m`."""
if n < 0 or m < 0:
return
"geremy condra" wrote in message
news:[email protected]...
> On Tue, Jun 1, 2010 at 9:42 AM, Nima wrote:
>> Hi there,
>> Is it possible to draw an (undirected) multigraph using a python library?
>> I need to write a program that finds an Eulerian circuit in a
y the name 'str' is
only looked up once rather than 1 times. :-)
Richard.
--
http://mail.python.org/mailman/listinfo/python-list
y inefficient approach. If you explain what you are planning
> to do we can most certainly come up with a better alternative.
>
> Peter
You're reading those bits backwards. You want to read the most
significant bit of each byte first...
Richard.
--
http://mail.python.org/mailman/listinfo/python-list
udent registrations do not include a seat
at the conference dinner.
Additional seats at the conference dinner may be purchased for $77
each.
All prices include GST.
Information about the registration process is on the PyCon Australia
website.
Richard Jones
PyCon Australia 2010
--
on. so I did it, but still nothing...
> using python 2.6.2 and reportlab 2.4
> help plz :)
The version of mkTable.py you posted is clearly different to the one
in the traceback. You might want to check that.
Richard.
--
http://mail.python.org/mailman/listinfo/python-list
"Lie Ryan" wrote in message
news:[email protected]...
> Probably bending the rules a little bit:
>
sum(x**2 - 8*x - 20 for x in range(1, 2010, 5))
> 536926141
Or, letting Python do the algera for you:
>>> from sympy import var, sum
>>> dummy = var('j k')
>>> k = (5 * j) + 1
>>>
registrations at the door. We will NOT be
accepting money at the door. If you're registered and haven't paid by
tomorrow you will not have a seat at the conference dinner.
Richard Jones
PyCon Australia 2010
--
http://mail.python.org/mailman/listinfo/python-list
even
> from a view of beauty, this is not a good design.
>
> I hope someone could teach me more about why Python design it like
> it is. Any reply is more than welcome.
>
> Thanks for your time!
>
> --
> Live like a child, think like the god.
If you desperately want to
I am trying to install Sphinx-1.0b under a Python3 environment.
Does anyone have experience with that task?
cd *1.0b2
python3 setup.py build
File "setup.py", line 50
print 'ERROR: Sphinx requires at least Python 2.4 to run.'
So
../
2to3 -w Sphinx-1.0b2
...
RefactoringTool: Warnings/mes
On Jul 7, 3:11 am, "Alf P. Steinbach /Usenet" wrote:
> Donald Knuth once remarked (I think it was him) that what matters for a
> program
> is the name, and that he'd come up with a really good name, now all he'd had
> to
> do was figure out what it should be all about.
>
> And so considering Stu
Tim Rentsch wrote:
> nanothermite911fbibustards
>
> > How to make Lisp go faster than C
> > Didier Verna
>
> Asking whether Lisp is faster than C is like asking why it's
> colder in the mountains than it is in the summer.
YM warmer.
HTH; HAND.
Richard
--
On Jul 17, 12:34 am, candide wrote:
> I don't understand why some parts of the Python language (or the Python
> standard library too) are implemented in C while some other parts are
> implemented in the Python language itself. For instance, lists and
> dictionnaries are implemented in C but sets a
u must be an idiot, that's entirely up to you, but I would take it
as a personal favour if you could be an idiot *somewhere else*. If you
don't like GNU software, fine - don't use it. End of problem.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
&qu
On Wed, 18 Aug 2010 01:39:09 -0700 (PDT), Nick Keighley
wrote:
>On 17 Aug, 18:34, Standish P wrote:
>> How are these heaps being implemented ? Is there some illustrative
>> code or a book showing how to implement these heaps in C for example ?
>
>any book of algorithms I'd have thought
>
>http:
On Thu, 19 Aug 2010 04:14:42 -0700 (PDT), spinoza
wrote:
>On Aug 18, 1:44=A0am, James Kanze wrote:
>> On Aug 17, 6:21 pm, Standish P wrote:
>>
>> > > Garbage collection doesn't use a stack. It uses a "heap",
>> > > which is in the abstract a collection of memory blocks of
>> > > different l
John Passaniti wrote:
On Aug 20, 6:51 pm, Hugh Aguilar wrote:
You can see an example of lists in my novice package (in the list.4th
file):http://www.forth.org/novice.html
Also in there is symtab, which is a data structure intended to be used
for symbol tables (dictionaries). Almost nobody uses
David Kastrup wrote:
John Bokma writes:
On the other hand: some people I knew during my studies had no problem
at all with introducing countless memory leaks in small programs (and
turning off compiler warnings, because it gave so much noise...)
[...]
As for electrical engineering: done th
Hugh Aguilar wrote:
[SNIP ;]
The real problem here is that C, Forth and C++ lack automatic garbage
collection. If I have a program in which I have to worry about memory
leaks (as described above), I would be better off to ignore C, Forth
and C++ and just use a language that supports garbage coll
Hugh Aguilar wrote:
On Aug 24, 4:17 pm, Richard Owlett wrote:
Hugh Aguilar wrote:
[SNIP ;]
The real problem here is that C, Forth and C++ lack automatic garbage
collection. If I have a program in which I have to worry about memory
leaks (as described above), I would be better off to ignore
"Hans Müller" wrote in message
news:[email protected]...
> Small addition:
>
> While tracing the network data I found the server to be the problem,
> the answer to a request is beeing delayed by about 180ms - no idea why.
Nagle's algorithm: you've unintentionally pro
"Joachim Strömbergson" wrote in message
news:[email protected]...
> Even so, choosing md5 in 2009 for something that (hopefully) will be
> used in years is a bad design decision. It creates a dependency for to
> an algorithm that all sensible recommendations po
"Nick" wrote in message
news:e54c4461-c0b7-42fb-8542-cefd7bf5f...@h18g2000yqj.googlegroups.com...
> file = open(prefix1)
> text = file.readlines()
> len = len(text)
You have redefined two built-in functions "file" and "len" in the first three
lines.
This is usually considered poor practice. S
"Tom Kermode" wrote in message
news:[email protected]...
> Do you know a good way to avoid running into this problem? It
> makes sense to suggest not calling variables the same names as
> built-in functions, but that's hard for a new python programmer who
> do
The date for the ninth PyWeek challenge has been set:
Sunday 30th August to Sunday 6th September (00:00UTC to 00:00UTC)
The PyWeek challenge invites entrants to write a game in one week from
scratch either as an individual or in a team. Entries must be developed
in Python, during the challeng
"Diez B. Roggisch" wrote in message
news:[email protected]...
> They have different line-ending-conventions. Not sure if and why that makes
> a difference.
Depends on your setup. Shells can be a bit dumb about it, so
it will likely break simple cgi-style hosting.
-bash: ./pyth
onger. I'll be
getting up to talk a bit about my experiences playing with IronPython
- what's cool and what's downright odd :)
If you've got an idea for a talk just add it to the wiki page.
Richard
--
http://mail.python.org/mailman/listinfo/python-list
The ninth PyWeek challenge will run between:
Sunday 30th August to Sunday 6th September (00:00UTC to 00:00UTC)
The PyWeek challenge invites entrants to write a game in one week from
scratch either as an individual or in a team. Entries must be developed
in Python, during the challenge, and must
"Robert Dailey" wrote in message
news:29ab0981-b95d-4435-91bd-a7a520419...@b15g2000yqd.googlegroups.com...
> UnicodeEncodeError: 'charmap' codec can't encode character '\xa9' in
> position 1650: character maps to
>
> The file is defined as ASCII.
That's the problem: ASCII is a seven bit code.
"Robert Dailey" wrote in message
news:f64f9830-c416-41b1-a510-c1e486271...@g19g2000vbi.googlegroups.com...
> As you can see, I am trying to load the file with encoding 'cp1252'
> which, according to the python 3.1 docs, translates to windows-1252. I
> also tried 'latin_1', which translates to I
You should certainly keep your test suite separate. There's a quick
example of how to write unit tests in the unittest documentation:
http://docs.python.org/library/unittest.html#basic-example
Richard.
--
http://mail.python.org/mailman/listinfo/python-list
"John Posner" wrote in message
news:[email protected]...
> if total > P.BASE:
> excessblk = Block(total - P.BASE, srccol, carry_button_suppress=True)
> else:
> excessblk = None
I wonder if it is appropriate to replace the None sentinel with one that
imes 2**172 (hex ac).
I grant that this example looks a bit gobbledegookish, but normal
usage would be much simpler. The notation doesn't handle
balanced trinary; however I opine that balanced trinary requires
special notation.
Richard Harter, [email protected]
http://home.tiac.net/~cri, http://www.varinoma.com
No one asks if a tree falls in the forest
if there is no one there to see it fall.
--
http://mail.python.org/mailman/listinfo/python-list
sturlamolden wrote:
> On 24 Aug, 02:26, [email protected] (Richard Maine) wrote:
>
> > You missed the word "OOP", which seemed like the whole point. Not that
> > the particular word is used in the Fortran standard, but it isn't hard
> > to guess that he
old "soon"). Some other compilers are also getting there.
But there is just no way that most people have spent much time
developing with compilers that adequately supported the f2003 OOP
features.
(I'd cite my formal comment on f2008, and maybe David Muxworthy's r
tes back
to f77 when character type was introduced; f2003 just extends it to the
C character kind for the obscure case where the C character kind might
be different from the default character kind (I don't know of any
compilers where this is so, but the standard allows for it).
--
Richard Maine
James Van Buskirk wrote:
> "Richard Maine" wrote in message
> news:1j4y84p.v5docbtueccmn%[email protected]...
>
> > One might plausibly regard this as a kludge, but it is a kludge that is
> > part of the Fortran standard and is guaranteed to work with all
The ninth PyWeek challenge starts this weekend, running between Sunday
30th August to Sunday 6th September (00:00UTC to 00:00UTC)
The PyWeek challenge invites entrants to write a game in one week from
scratch either as an individual or in a team. Entries must be developed
in Python, during the
e Fortran standard, but it isn't hard
to guess that he means a derived type that uses some of the OOP
features. Inheritance, polymorphism, and type-bound procedure (aka
methods in some other languages) come to mind. Since you say that you
haven't used any of the F2003 OOP features, it
"Stefan Behnel" wrote in message
news:[email protected]...
>>Not a bug in IE (this time), which is correctly parsing the file as html.
>
> ... which is obviously not the correct thing to do when it's XHTML.
It isn't though; it's HTML with a XHTML DOCTYPE, a
t
> return s[0:until] == s[-1:runtil:-1]
>
>
At first glance this seems to be correct, but it is tricky indeed.
Particularly the assignment of the offset variable, casting a bool to
an integer of a negated expression. Given that Baba notes that this is
a beginners level query, it wouldn't have hurt to be a little bit more
verbose there.
Richard
--
http://mail.python.org/mailman/listinfo/python-list
def reversed(s):
> return s[::-1]
> return s == reversed(s)
> --
> http://mail.python.org/mailman/listinfo/python-list
>
That seems like a bit of overkill... Why would you want to define a
function in a function for something trivial like this? Just
def palindrome(s):
return s[::-1]
will do fine.
Of course, you can stick the inner function in a library somewhere if you like.
Regards,
Richard
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Aug 27, 2010 at 11:47 PM, Richard Arts wrote:
> On Fri, Aug 27, 2010 at 10:51 PM, Jussi Piitulainen
> wrote:
>> MRAB writes:
>>> On 27/08/2010 20:43, Jussi Piitulainen wrote:
>>>> Dave Angel writes:
>>>>> Jussi Piitulainen wrote:
&g
901 - 1000 of 1086 matches
Mail list logo