🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #201282

Re: Python Question

#201282
From: A.Melon
Date: Sat, 28 Jan 2006 15:37
61 lines
3165 bytes
On Fri, 27 Jan 2006 23:52:13 -0700, Borked Pseudo Mailed wrote:

> Anonymous wrote:
> 
>> Suppose this:
>> 
>> a = 'aaaa,bbbb,cccc'
>> b = a.split(,)
>               ^
> Broken. You left out some quotes.
> 
>> So:
>> b[0] = aaaa
>> b[1] = bbbb
>> b[2] = cccc
>> 
>> But how can I tell that b[2] is the last element?
>> 
>> if I try to look at b[3], maybe to test if it is a null, the interpreter
>> comes back with an error and stops the execution.
> 
> Yeah, an "out of range" error just like your Pan script does when it
> screws up on certain input, Eelbash.
> 
> The solution is elementary because the question is ridiculously basic.
> It's not even a Python question really. I'd bet "how do I find the length
> of an array" is something every first week programmer in any language
> asks, and figuring it out is something any teacher might use as a tool to
> teach basic, beginner programming methodologies. You shouldn't be
> releasing code to unsuspecting users if you aren't already familiar with
> this insanely simple bit of coding. Seriously... all BS aside. Take some
> time to learn at least the basics.
> 
> And before you start ranting and raving about how I don't know an answer
> but just want to pick on someone, two different ways leaped to mind
> automatically... indexing and slicing. I'll leave it to you to toil over
> why they're different, and which one you might need.
> 
>>>> import string
>>>> a = 'aaa,bbb,ccc'
>>>> b = a.split(',')
>>>> b[len(b)-1]
> 'ccc'
>>>> b[-1:]
> ['ccc']

Your answer is appreciated, or would be if you hadn't surrounded it with
such snotnosed insults.

It is obvious that scripting can be useful in helping with anonymity, and
disseminating knowledge of Python and other scripts is a good use of the
newsgroup.

What are people to think when they see the kind of snide answer you gave
to the question?

What will they think of the 'anonymity experts' and remailer operators
here?

Technical Details
Message-ID: <4b99821151a3f57f451e7431b7c580c4@melontraffickers.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!199.218.7.141!news.glorb.com!news.amigo.co.uk!remailer.org.uk!mail2news
References: <PR3MNVZC38744.7423032407@anonymous> <1cfb938c5aff4897a5795a777ff15519@pseudo.borked.net>

Show Full Headers
Complete Article Headers
Message-ID: <4b99821151a3f57f451e7431b7c580c4@melontraffickers.com>
Subject: Re: Python Question
Date: Sat, 28 Jan 2006 15:37:31 +0000
From: A.Melon <juicy@melontraffickers.com>
References: <PR3MNVZC38744.7423032407@anonymous> <1cfb938c5aff4897a5795a777ff15519@pseudo.borked.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!199.218.7.141!news.glorb.com!news.amigo.co.uk!remailer.org.uk!mail2news
Comments: This message did not originate from the Sender address above. It was
 remailed automatically by anonymizing remailer software. Please report
 problems or inappropriate use to the remailer administrator at
 abuse@melontraffickers.com. Please read
 http://www.melontraffickers.com/remailer.html before contacting the remailer
 administrator.
NNTP-Posting-Host: 216.218.240.190
X-pugleaf-debug: badGroups=1 valid=1
Newsgroups: alt.privacy.anon-server