Prev: integer >= 1 == True and integer.0 == False is bad, bad, bad!!!
Next: getting the variable type
From: rantingrick on 11 Jul 2010 18:36 On Jul 11, 12:23 pm, MRAB <pyt...(a)mrabarnett.plus.com> wrote: > If you're so unhappy with Python, why don't you create your own > language. I suggest the name "Rantthon". Ah yes, then i can finally assume my worthy title of the "Ranting Dictator For Life"! ;-)
From: Steven D'Aprano on 11 Jul 2010 20:06 On Sun, 11 Jul 2010 01:30:36 -0700, rantingrick wrote: > On Jul 11, 3:03 am, "Günther Dietrich" <gd.use...(a)spamfence.net> wrote: > >> So, it is not a disadvantage that the functions you listed above are >> named in this way. In the contrary, it is an advantage, as it keeps >> newcomers from using stupid variable names. > > "int" for an Integer is stupid? > "list" for a List is stupid? > "str" for a String is stupid? > > What am i missing? If you're going to use generic names, why type three or four letters when one will do? i, j, k, m, n, p, q for ints. L, a, b, x for lists s, t, a, b for strings. If you don't want to use generic names, then int, list, str are useless because they don't mean anything. You need something like: count_of_widgets list_of_widgets description -- Steven
From: Steven D'Aprano on 11 Jul 2010 20:06 On Sun, 11 Jul 2010 00:26:36 -0700, rantingrick wrote: > Another source of asininity seems to be the naming conventions of the > Python language proper! True/False start with an upper case and i > applaud this. However str, list, tuple, int, float --need i go on...?-- > start with lowercase. > > Q: Well what the hell is your problem Rick. Who cares right? > > WRONG, I tell you what my problem is. Now i cannot "wisely" use > variables like... > > str="this is a string" > list = [1,2,3] > def make_random_objs(range=10) > def show_message(str) > int = 12 Yes. So what? You can't wisely use variables like: True = "rantingrick is an obnoxious loudmouth" None = "the problem he is describing" Nor can you wisely use variables like: len = len("something") chr = chr(48) [...] > Just thoughts. But not deep thoughts. -- Steven
From: Mark Lawrence on 11 Jul 2010 20:31 On 12/07/2010 01:06, Steven D'Aprano wrote: > On Sun, 11 Jul 2010 00:26:36 -0700, rantingrick wrote: > >> Another source of asininity seems to be the naming conventions of the >> Python language proper! True/False start with an upper case and i >> applaud this. However str, list, tuple, int, float --need i go on...?-- >> start with lowercase. >> >> Q: Well what the hell is your problem Rick. Who cares right? >> >> WRONG, I tell you what my problem is. Now i cannot "wisely" use >> variables like... >> >> str="this is a string" >> list = [1,2,3] >> def make_random_objs(range=10) >> def show_message(str) >> int = 12 > > > Yes. So what? You can't wisely use variables like: > > True = "rantingrick is an obnoxious loudmouth" +1 QOTW > None = "the problem he is describing" > > Nor can you wisely use variables like: > > len = len("something") > chr = chr(48) > > > [...] >> Just thoughts. > > But not deep thoughts. > Well said Steven, or is it Stephen, or Stephan, or Stefen, or what? Kindest regards. Mark Lawrence.
From: Steven D'Aprano on 11 Jul 2010 22:40 On Mon, 12 Jul 2010 01:31:14 +0100, Mark Lawrence wrote: > Well said Steven, or is it Stephen, or Stephan, or Stefen, or what? For some reason, when I answer the phone and say "Hello, Steven speaking?" I often get called Peter. -- Steven
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: integer >= 1 == True and integer.0 == False is bad, bad, bad!!! Next: getting the variable type |