Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'syntax': 0.03; 'subject:Python': 0.05; 'context': 0.05; 'float': 0.05; 'needed,': 0.05; 'none,': 0.05; 'interpreted': 0.07; 'lines.': 0.07; 'null,': 0.07; 'practice,': 0.07; 'problem?': 0.07; 'python': 0.09; 'cc:addr:googlegroups.com': 0.09; 'errors,': 0.09; 'none.': 0.09; 'tuple': 0.09; 'type)': 0.09; 'cc:addr:python-list': 0.10; "wouldn't": 0.11; 'suggest': 0.11; "(it's": 0.16; '->': 0.16; 'accordingly,': 0.16; 'commented': 0.16; 'dummy': 0.16; 'err...': 0.16; 'hostile.': 0.16; 'programmer,': 0.16; 'those,': 0.16; 'string': 0.17; 'wrote:': 0.17; 'variables': 0.17; 'version.': 0.17; '(not': 0.20; 'variable': 0.20; 'define': 0.20; 'email addr:gmail.com>': 0.20; 'written': 0.20; 'trying': 0.21; 'meant': 0.21; 'init': 0.22; 'cc:no real name:2**0': 0.24; 'idea': 0.24; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In- Reply-To:1': 0.25; 'guess': 0.27; 'language.': 0.27; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'loop,': 0.29; 'str': 0.29; 'unlikely': 0.29; 'skip:& 10': 0.29; 'source': 0.29; 'probably': 0.29; "i'm": 0.29; 'code': 0.31; 'point': 0.31; 'comments': 0.33; 'int': 0.33; 'version': 0.34; "can't": 0.34; 'received:google.com': 0.34; 'list': 0.35; 'otherwise.': 0.35; 'doing': 0.35; 'too.': 0.35; 'really': 0.36; 'but': 0.36; 'wanted': 0.36; 'programmers': 0.36; "i'll": 0.36; 'should': 0.36; 'thank': 0.36; 'moment': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'things': 0.38; 'performance': 0.39; 'notice': 0.39; 'help': 0.40; 'think': 0.40; 'your': 0.60; 'you.': 0.61; 'further': 0.61; "you'll": 0.62; 'is.': 0.62; 'excited': 0.63; 'different': 0.63; 'ever': 0.63; 'offer': 0.65; 'stuck': 0.65; '2013': 0.84; 'malicious': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=8nmryLz9QhuAt7h7vVMox149oMohzrgch2MqoHVSzic=; b=XKHyVjd03w8ioNVihrZxj1GJMzmsueb3sKGFY1w0BL475qoK5M1FPMalaW7osTyb0R N+B+KhxsroIaY4Ql3fJ5+5gLYPOu6O8FsDAkgj61W2cjkxL1j13/ChljqSZd90LqVVnx /5OSGzSz52+QJzrtfJoT6ySu6xuRTzhMfwU+lALW7aMAmDfOehA2yCmHUgGUbQqPlUQn CHJbCtMEfBLE/t7cIr0g9XZkiTfTrjAmIpQvNDnjfcxy8wQ3pWX/pu5UydAKCw8zLRqM v3O+3gjG5Pz1TGYpsU1yCdQuZ+haNJIgE9pqbHnfdIdnIuznEUBEcuBUtgpXdCuqP6BG CcrQ== X-Received: by 10.152.132.138 with SMTP id ou10mr8135864lab.56.1361747663487; Sun, 24 Feb 2013 15:14:23 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <5127848B.1060004@gmail.com> <928d2cf7-728b-4f35-b8c9-4c9b958507e5@googlegroups.com> <8eadd52c-d533-4333-8c7f-7bf3a6d7b046@googlegroups.com> <9p1ii899tkalvfd1cl7sneoqa9t1cqh4oj@invalid.netcom.com> <5129482F.3080402@gmail.com> <512a5199$0$29998$c3e8da3$5496439d@news.astraweb.com> <5a3bf25b-a08b-4084-a940-e1fd05a1045d@googlegroups.com> From: Joshua Landau Date: Sun, 24 Feb 2013 23:13:43 +0000 Subject: Re: Python Newbie To: piterrr.dolinski@gmail.com Content-Type: multipart/alternative; boundary=f46d042d051cc180d604d68095e2 Cc: python-list , comp.lang.python@googlegroups.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 155 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361747665 news.xs4all.nl 6940 [2001:888:2000:d::a6]:55953 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39814 --f46d042d051cc180d604d68095e2 Content-Type: text/plain; charset=ISO-8859-1 On 24 February 2013 22:43, wrote: > Josh, > > Not thank you for your malicious post. > Be careful, us programmers do *eventually* catch on to who is a troll, and if you say things like that we may eventually mark you off as just to hostile. I *honestly* meant no malice or insult. If you can't take my word, you can point out what I said that was otherwise. (Then again, you'll have about a week before we really start to notice :P) > I think you are missing the point here. > > My source code was just a dummy to offer context for the question I wanted > to ask. Further down the line, if I ever feel I don't need to > pseudo-declare variables I will stop doing it. But for the moment I am > trying to imitate familiar ground. > > My code as written has no syntax errors, so what's the problem? It is > highly unlikely you will ever read any of my Python code - no need to get > excited over a few of my lines. > You said "Any comments on this before I quit my job?". I commented on how I think you should approach Python in order to appreciate its virtues rather than get stuck in its differences. Again, I am no good programmer, but I think these methods will help you. > And you don't need to answer questions which were not posed, thank you. > Nor do I need to answer questions which were posed. > I wanted Python to register what type of variable I'm after. So I init my > vars accordingly, int might be 0, float 0.0 and string with null, err... > None. > You seem to think that a "null" version of a type is the falsy version. Then: int -> 0 float -> 0. tuple -> () list -> [] And then (*dun dun duuun!*): str -> "" (NOT None, which is a different type) Other people have commented on whether this is a good idea (it's not), so I'll suggest you read those, too. In practice, I wouldn't define an intX_asString var, I would do "str (num)" > every time a string representation is needed, provided it isn't a loop, as > in that context the expression would probably negatively impact performance > in an interpreted language. PS: Guess what str(None) is. --f46d042d051cc180d604d68095e2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 24 February 2013 22:43, <piterrr.dolinski@g= mail.com> wrote:
Josh,

Not thank you for your malicious post.

Be careful, us programmers do *eventually* catch on to who is a troll= , and if you say things like that we may eventually mark you off as just to= hostile.
I *honestly* meant no malice or insult. If you can't take my= word, you can point out what I said that was otherwise.
(Then again, you'll have about a week before we real= ly start to notice :P)
=A0
I think you are missing the point here.

My source code was just a dummy to offer context for the question I wanted = to ask. Further down the line, if I ever feel I don't need to pseudo-de= clare variables I will stop doing it. But for the moment I am trying to imi= tate familiar ground.

My code as written has no syntax errors, so what's the problem? It is h= ighly unlikely you will ever read any of my Python code - no need to get ex= cited over a few of my lines.

You said "= Any comments on this before I quit my job?".

I co= mmented on how I think you should approach Python in order to appreciate it= s virtues rather than get stuck in its differences. Again, I am no good pro= grammer, but I think these methods will help you.
=A0
And you don't need to answer questions which were not posed, thank you.=

Nor do I need to answer question= s which were posed.
=A0
I wanted Python to register what type of variable I'm after. So I init = my vars accordingly, int might be 0, float 0.0 and string with null, err...= None.

You seem to think that a &= quot;null" version of a type is the falsy version. Then:
int -> 0
float -> 0.
tuple= -> ()
list -> []

And then (*dun dun duuun!*):

str -&g= t; "" (NOT None, which is a different type)

Other people have commented on whether this is a = good idea (it's not), so I'll suggest you read those, too.

In practice, I wouldn't define an intX_asString var, I would do "s= tr (num)" every time a string representation is needed, provided it is= n't a loop, as in that context the expression would probably negatively= impact performance in an interpreted language.

PS: Guess what str(None) is.
--f46d042d051cc180d604d68095e2--