Peter Dilley posted these links on the python-list a few hours ago.
Cobra looks VERY interesting to me.
Comparison to Python:
http://cobra-language.com/docs/python/
Main Page:
http://cobra-language.com/
Article that first caught my eye regarding Cobra:
http://www.computerworld.com.au/index.php/
There's a couple of errors in here that no one has addressed yet because the
question was geared towards programming style... So now I will address them.
Or undress them, I suppose. ;-)
> #!/user/bin/python
> """
>>From the testing laboratory of:
> b h a a l u u at g m a i l dot c o m
> 2008-02-
Damian Archer wrote:
> # User inputs numbers to compare, z is for the index counter
> x = input("Enter a number between 1 and 0: ")
> y = input("Enter a second number between 1 and 0: ")
We generally discourage the use of input(), it is (arguably) a security
hole -
http://www.wellho.n
I'll throw in a couple of ideas, but I won't pretend to be an expert. ;-)
>I have written what i see as a pretty decent script to resolve this
> question:
>
> Write an improved version of the Chaos program from Chapter 1 that allows
> a
> user to input two initial
> values and the number of iter
Some suggestions throughout
> def runThrough():
>walk = os.walk("/media/sda1/Documents/Pictures/2007") #location of the
> pics I want to use
>count = 0
>for root, dirs, files in walk:
>try:
>for x in files:
>if x.lower().find(".jpg")> -1: #If it's a
On Feb 7, 2008 6:47 PM, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
> "Alan Gauld" <[EMAIL PROTECTED]> wrote
>
> >> What is the equivalent of JUnit in Python?
> >
> > I think the nearest equivalent is
> >
>
> Oops, I was going top say PyUnit then remembered the name
> had changed but forgot to check ou
"Alan Gauld" <[EMAIL PROTECTED]> wrote
>> What is the equivalent of JUnit in Python?
>
> I think the nearest equivalent is
>
Oops, I was going top say PyUnit then remembered the name
had changed but forgot to check out the latest incarnation.
Fortyunately others have done the work for me.
P
On Feb 7, 2008 4:58 PM, Eric Brunson <[EMAIL PROTECTED]> wrote:
> bhaaluu wrote:
> > What is the equivalent of JUnit in Python? The article says that JUnit is
> > used for unit tests, or you can write your own. Since I don't have a clue,
> > writing my own is probably out the question. Also I'm not
"bhaaluu" <[EMAIL PROTECTED]> wrote
> What is the equivalent of JUnit in Python?
I think the nearest equivalent is
> writing my own is probably out the question. Also I'm not familiar
> with
> Java, and am just learning Python OOP, so I'm not getting much out
> of that one. Sorry. Absolute Beg
bhaaluu wrote:
> What is the equivalent of JUnit in Python?
The unittest module is based on JUnit.
http://docs.python.org/lib/module-unittest.html
Here is a simple introduction to the capabilities of unittest. It
doesn't do much to motivate the examples though:
http://www.oreillynet.com/onlamp/
bhaaluu wrote:
> What is the equivalent of JUnit in Python? The article says that JUnit is
> used for unit tests, or you can write your own. Since I don't have a clue,
> writing my own is probably out the question. Also I'm not familiar with
> Java, and am just learning Python OOP, so I'm not getti
On Feb 7, 2008 4:07 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> bhaaluu wrote:
>
> > The TDD method is the method used in my tutorial:
> > Python Programming for the Absolute Beginner 2E. Michael Dawson. 2006.
> > Dawson uses a very simple Tamagotchi example called Critter Caretaker
> > to introd
bhaaluu wrote:
> The TDD method is the method used in my tutorial:
> Python Programming for the Absolute Beginner 2E. Michael Dawson. 2006.
> Dawson uses a very simple Tamagotchi example called Critter Caretaker
> to introduce the mechanics of POOP. However, perhaps he is using
> the TDD method of
Also beware the difference between reassigning and extending:
class F:
a = 3
b = []
def __init__(self, a, b):
self.a = a
self.b.append(b)
def show(self):
print self.a, self.b
f1=F(1,2)
f2=F(3,4)
f1.show() # 1 [2, 4]
f2.show() # 3 [2, 4]
--
Bob Gailer
919-636-4239 Chapel Hill
> Date: Thu, 7 Feb 2008 00:05:54 -0500> From: [EMAIL PROTECTED]> To: [EMAIL
> PROTECTED]; Tutor@python.org> Subject: Re: [Tutor] Thought of some other
> things.> > On Feb 6, 2008 11:38 PM, Timothy Sikes <[EMAIL PROTECTED]> wrote:>
> >> > First off, I was running my script from my flash drive-Th
Sorry, my bad - this was my me, but I forgot to hit "Reply All".
Here's a situation I often encounter, and I was wondering what the
"best practice" is. I've generally initialized my classes' attributes
this same way:
> class TestClass1(object):
> """ please give me a better name"""
> def
> Sorry, my bad - this was my me, but I forgot to hit "Reply All".
My me? I think I meant to type "my message".
--
www.fsrtechnologies.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
bhaaluu wrote:
> Best practice?
Use class attributes when you actually want a shared attribute, for
example for constants with class scope, or as defaults when instance
attributes may not be assigned. Class attributes can be redefined by
subclasses which makes them useful as a way to configure
I was asked:
Here's a situation I often encounter, and I was wondering what the
"best practice" is. I've generally initialized my classes' attributes
this same way:
> class TestClass1(object):
> """ please give me a better name"""
> def __init__(self):
> """please document me""
On Feb 7, 2008 5:44 AM, Michael Bernhard Arp Sørensen
<[EMAIL PROTECTED]> wrote:
> Greetings Masters.
>
> I was wondering if there's a well know word for python programmers, that is
> usable as a domain name. Unfortunately, "pug.dk", as in "python user group,
> Denmark", is unavailable here in Denm
Greetings,
I've read both Kent's and Alan's approaches to designing a POOP,
and am intrigued with the possibilities of the noun/verb/adjective
technique, but am also sympathetic to the TDD method as well
because it is how I've always programmed. I have noted Alan's
comments on the limitations of T
>Michael Bernhard Arp Sørensen wrote:
>> Greetings Masters.
>>
>> I was wondering if there's a well know word for python programmers, that
>> is usable as a domain name.
>
>Pythonista is one. pythonista.dk seems to be available.
>
>Kent
Other available .dk domains
pyproject.dk
pyprojects.dk
I have written what i see as a pretty decent script to resolve this
question:
Write an improved version of the Chaos program from Chapter 1 that allows a
user to input two initial
values and the number of iterations and then prints a nicely formatted table
showing how the values
change over time.
On 07/02/2008, Michael Bernhard Arp Sørensen <[EMAIL PROTECTED]> wrote:
> Greetings Masters.
>
> I was wondering if there's a well know word for python programmers, that is
> usable as a domain name. Unfortunately, "pug.dk", as in "python user group,
> Denmark", is unavailable here in Denmark.
>
>
Alan Gauld wrote:
> "Kent Johnson" <[EMAIL PROTECTED]> wrote
>> The writings of Robert C Martin have taught me a lot about good
>> design
>> and agile development. They don't all apply to Python
>
> Martin is very good on Agile, I'm less impressed with his OO writing,
> largely because he does te
Michael Bernhard Arp Sørensen wrote:
> Greetings Masters.
>
> I was wondering if there's a well know word for python programmers, that
> is usable as a domain name.
Pythonista is one. pythonista.dk seems to be available.
Kent
___
Tutor maillist - Tu
Greetings Masters.
I was wondering if there's a well know word for python programmers, that is
usable as a domain name. Unfortunately, "pug.dk", as in "python user group,
Denmark", is unavailable here in Denmark.
I hope to acquire a national domain name and let future local user groups
choose the
Greetings Masters.
I was wondering if there's a well know word for python programmers, that is
usable as a domain name. Unfortunately, "pug.dk", as in "python user group,
Denmark", is unavailable here in Denmark.
I hope to acquire a national domain name and let future local user groups
choose the
On Feb 6, 2008 8:15 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
>
> Design a little, code a little, repeat...
> http://personalpages.tds.net/~kent37/stories/3.html
>
>
> You can discover many useful design techniques by applying DRY. More here:
> http://personalpages.tds.net/~kent37/s
"Kent Johnson" <[EMAIL PROTECTED]> wrote
> Let me say that I don't mean any disrespect for Alan or his
> approach, I
> just have a different point of view.
Heh, heh! I was waiting for someone to post a message like this.
I'll respond by saying the noun/verb thing is not actually the
method I wou
30 matches
Mail list logo