Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3849

Re: learnpython.org - an online interactive Python tutorial

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.04; 'string.': 0.04; 'string,': 0.05; 'operator,': 0.09; 'subject:tutorial': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'handy': 0.16; "ibm's": 0.16; 'met,': 0.16; 'okay,': 0.16; 'places.': 0.16; 'saa': 0.16; 'us."': 0.16; 'wow,': 0.16; 'language': 0.20; '(or': 0.22; 'header:In-Reply-To:1': 0.22; 'integer': 0.23; 'numbers.': 0.23; 'received:209.85.214.174': 0.23; 'received:mail- iw0-f174.google.com': 0.23; 'expect': 0.26; "i'm": 0.26; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'string': 0.29; 'fri,': 0.29; 'number,': 0.29; 'experiences': 0.29; 'probably': 0.30; '(the': 0.30; 'feelings': 0.31; 'influenced': 0.31; 'strings,': 0.31; 'however,': 0.31; 'to:addr:python-list': 0.32; 'another': 0.32; 'done': 0.32; 'someone': 0.33; 'several': 0.33; 'editor': 0.35; 'print': 0.35; 'constant': 0.35; 'dns': 0.35; 'rather': 0.36; 'else': 0.37; 'should': 0.37; 'received:209.85': 0.37; 'apr': 0.38; 'date,': 0.38; 'resulting': 0.38; 'strings': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'happens': 0.38; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'add': 0.39; 'basic': 0.40; 'automated': 0.40; 'greater': 0.40; 'header:Received:5': 0.40; 'might': 0.40; '2011': 0.62; 'credit': 0.67; 'subject:online': 0.77; 'promote': 0.78; 'concatenate': 0.84; 'dollars': 0.87
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=0ZVIPAPw+GNaGDW4BxiLyPo7joB9TA7+h7/qHYc0kgQ=; b=IrDXZzNT55b7CwqzIp840N+9I0Ct1CdvP/swjB4lEUyq2KH3K+rMVkwR5B0Y4xWSUD AgzpPplTs5Rzst9lcO/e4PNYHMbOwmRowoUPNa32mAj/Tr2mp2uLrbgwPcHwTnOGCSnN pQuPR1CtpGyZwJK1cWB7rFvrmrm29yJ5Rl1nE=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=BIij+ppcYGrR3zGgJLFdrUAitVeZJBKS4GiKqPdfBTsjXfCRNZPwGqRYyH3hEhiB4n QSJpUxhBkSl6RYkl+y+cx16YDStu7fcSbgKjRh8MgeKi/6KhSH9NVOXNE3oVFqC8JJ7t +sit3gKUw1KLr+ya2y2WYoIMPr8Jx+YzpN5Yk=
MIME-Version 1.0
In-Reply-To <yn9sp.39116$yp3.16271@newsfe09.iad>
References <506eb5e4-4f29-473a-8d47-2082322e005e@glegroupsg2000goo.googlegroups.com> <201104211710.19587.akabaila@pcug.org.au> <BANLkTimCG4v8j+St0aSaqkMomhyHp5VYhA@mail.gmail.com> <mailman.687.1303371055.9059.python-list@python.org> <yn9sp.39116$yp3.16271@newsfe09.iad>
Date Fri, 22 Apr 2011 17:08:53 +1000
Subject Re: learnpython.org - an online interactive Python tutorial
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.734.1303456137.9059.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 82.94.164.166
X-Trace 1303456137 news.xs4all.nl 81473 [::ffff:82.94.164.166]:44264
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:3849

Show key headers only | View raw


On Fri, Apr 22, 2011 at 4:38 PM, harrismh777 <harrismh777@charter.net> wrote:
> My feelings about this are strongly influenced by my experiences with the
> REXX language on IBM's SAA systems--- OS/2 and VM/CMS. In REXX everything is
> a string... everything. If a string just happens to be a REXX number, then
> it can be manipulated as you might expect for a number.

Wow, someone else who knows REXX and OS/2! REXX was the first bignum
language I met, and it was really cool after working in BASIC and
80x86 assembly to suddenly be able to work with arbitrary-precision
numbers!

The "everything is a string, but treat it as a number if you like"
system is rather handy in a few places. I wanted it for my automated
DNS editor - I wanted to concatenate several numbers (from the date,
and the constant "1"), and then, if the resulting number is not
greater than another number (the previous serial), increment. Ahh
well...

I'm not so sure that all strings should autopromote to integer (or
"numeric" generally). However, adding a string and a number _should_
(IMHO) promote the number to string.

print "Hello, "+name+", you have "+credit+" dollars of credit with us."

Okay, that one is probably better done with the % operator, but it
definitely makes logical sense to concatenate numbers and strings as
strings, not to add them as numbers.

Chris Angelico

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

learnpython.org - an online interactive Python tutorial Ron <ron.reiter@gmail.com> - 2011-04-20 10:15 -0700
  Re: learnpython.org - an online interactive Python tutorial Matty Sarro <msarro@gmail.com> - 2011-04-20 13:57 -0400
  Re: learnpython.org - an online interactive Python tutorial Terry Reedy <tjreedy@udel.edu> - 2011-04-20 18:12 -0400
  Re: learnpython.org - an online interactive Python tutorial Chris Angelico <rosuav@gmail.com> - 2011-04-21 14:07 +1000
  Re: learnpython.org - an online interactive Python tutorial Algis Kabaila <akabaila@pcug.org.au> - 2011-04-21 17:10 +1000
    Re: learnpython.org - an online interactive Python tutorial harrismh777 <harrismh777@charter.net> - 2011-04-21 02:29 -0500
  Re: learnpython.org - an online interactive Python tutorial Chris Angelico <rosuav@gmail.com> - 2011-04-21 17:19 +1000
  Re: learnpython.org - an online interactive Python tutorial Heiko Wundram <modelnine@modelnine.org> - 2011-04-21 09:30 +0200
    Re: learnpython.org - an online interactive Python tutorial harrismh777 <harrismh777@charter.net> - 2011-04-22 01:38 -0500
      Re: learnpython.org - an online interactive Python tutorial Chris Angelico <rosuav@gmail.com> - 2011-04-22 17:08 +1000
        Re: learnpython.org - an online interactive Python tutorial harrismh777 <harrismh777@charter.net> - 2011-04-23 19:37 -0500
          Re: learnpython.org - an online interactive Python tutorial Cameron Simpson <cs@zip.com.au> - 2011-04-24 12:23 +1000
            Re: learnpython.org - an online interactive Python tutorial harrismh777 <harrismh777@charter.net> - 2011-04-23 21:39 -0500
              Re: Re: learnpython.org - an online interactive Python tutorial Dave Angel <davea@ieee.org> - 2011-04-24 07:16 -0400
                Re: learnpython.org - an online interactive Python tutorial harrismh777 <harrismh777@charter.net> - 2011-04-25 01:14 -0500
      Re: learnpython.org - an online interactive Python tutorial Mel <mwilson@the-wire.com> - 2011-04-22 09:07 -0400
        Re: learnpython.org - an online interactive Python tutorial Roy Smith <roy@panix.com> - 2011-04-22 09:22 -0400
      Re: learnpython.org - an online interactive Python tutorial Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-04-22 23:28 -0700
        Re: learnpython.org - an online interactive Python tutorial flebber <flebber.crue@gmail.com> - 2011-04-23 05:49 -0700
          Re: learnpython.org - an online interactive Python tutorial Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-04-23 11:01 -0700
        Re: learnpython.org - an online interactive Python tutorial rantingrick <rantingrick@gmail.com> - 2011-04-23 08:16 -0700
      Re: learnpython.org - an online interactive Python tutorial rantingrick <rantingrick@gmail.com> - 2011-04-23 08:21 -0700
      Re: learnpython.org - an online interactive Python tutorial Dotan Cohen <dotancohen@gmail.com> - 2011-04-23 19:51 +0300
      Re: learnpython.org - an online interactive Python tutorial Tim Chase <python.list@tim.thechases.com> - 2011-04-23 12:25 -0500
      Re: learnpython.org - an online interactive Python tutorial Westley Martínez <anikom15@gmail.com> - 2011-04-23 12:38 -0700
      Re: learnpython.org - an online interactive Python tutorial Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-24 00:42 +0000
        Re: learnpython.org - an online interactive Python tutorial Chris Angelico <rosuav@gmail.com> - 2011-04-24 11:35 +1000
          Re: learnpython.org - an online interactive Python tutorial Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-24 08:13 +0000
            Re: learnpython.org - an online interactive Python tutorial Chris Angelico <rosuav@gmail.com> - 2011-04-24 18:21 +1000
        Re: learnpython.org - an online interactive Python tutorial harrismh777 <harrismh777@charter.net> - 2011-04-23 22:10 -0500
          Re: learnpython.org - an online interactive Python tutorial Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-24 09:18 +0000
            Re: learnpython.org - an online interactive Python tutorial harrismh777 <harrismh777@charter.net> - 2011-04-25 01:20 -0500
              Re: learnpython.org - an online interactive Python tutorial Terry Reedy <tjreedy@udel.edu> - 2011-04-25 11:43 -0400
              Re: learnpython.org - an online interactive Python tutorial Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-04-26 13:06 +1200
          Re: learnpython.org - an online interactive Python tutorial jmfauth <wxjmfauth@gmail.com> - 2011-04-24 08:15 -0700
  Re: learnpython.org - an online interactive Python tutorial Westley Martínez <anikom15@gmail.com> - 2011-04-21 07:14 -0700
  Re: learnpython.org - an online interactive Python tutorial MRAB <python@mrabarnett.plus.com> - 2011-04-21 17:13 +0100
  Re: learnpython.org - an online interactive Python tutorial Dotan Cohen <dotancohen@gmail.com> - 2011-04-23 16:45 +0300

csiph-web