Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Encapsulation, inheritance and polymorphism
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Lipska the Kat  
View profile  
 More options Jul 17 2012, 8:01 am
Newsgroups: comp.lang.python
From: Lipska the Kat <lip...@lipskathekat.com>
Date: Tue, 17 Jul 2012 13:01:12 +0100
Local: Tues, Jul 17 2012 8:01 am
Subject: Re: Encapsulation, inheritance and polymorphism
On 17/07/12 09:45, Lipska the Kat wrote:

> Pythoners

> Python 2.7.3
> Ubuntu Linux 12.04 LTS

> I've been taking a brief look at Python.

snip

Well I've set myself a task.
I have a text file containing a list of stock items
each line contains the number in stock followed by a tab followed by the
name of the item. I need to implement something that reads in the text
file and outputs the stock list in ascending or descending order of
quantity.

Please note I am NOT asking for solutions.

In bash this is laughably trivial

sort -nr $1 | head -${2:-10}

Java is easy but long winded and takes a while to set up

C is ... well it's been a while but I'll get there

Python, well that's my current task. It will be interesting to compare
the solutions for speed and ease of development and more importantly
re-usability.

> Lipska

--
Lipska the Kat: Troll hunter, Sandbox destroyer
and Farscape dreamer of Aeryn Sun.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.