rupa / sprunge

command line pastebin for google appengine
http://sprunge.us
724 stars 70 forks source link

Code issues? #29

Open SoniEx2 opened 9 years ago

SoniEx2 commented 9 years ago

I'm reading this code and I'm not sure what it does... What's new_id and why does it only use the first 35 chars of the string 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'? see here

Shouldn't this use len(symbols)? 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'[0:35] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi'

Also, here why use "[n:n + 1]" when you can just use "[n]"?

rupa commented 9 years ago

cheers