C is back on top... just358 (4/10/2012 7:25:56 AM) comp.lang.c http://www.h-online.com/open/news/item/TIOBE-C-is-back-on-top-just-1517532.html ... candide
Regular expression : non capturing groups are faster ?620 (1/3/2012 11:14:35 AM) comp.lang.python Excerpt from the Regular Expression HOWTO (http://docs.python.org/howto/regex.html#non-capturing-and-named-groups) : ----------------------------------------------- It should be mentioned that there�s no per... candide
Repeating assertions in regular expression312 (1/3/2012 8:46:32 AM) comp.lang.python The regular expression HOWTO (http://docs.python.org/howto/regex.html#more-metacharacters) explains the following # ------------------------------ zero-width assertions should never be repeated, because if t... candide
Type object returned by the re.compile function219 (12/27/2011 9:56:19 PM) comp.lang.python The Python 2.7 official documentation here: http://docs.python.org/library/re.html#re.compile doesn't specify the type object returned by the re.compiled function. According to the documentation, re.compile ... candide
Regexp : repeated group identification343 (12/14/2011 11:12:07 AM) comp.lang.python Consider the following code # ---------------------------- import re z=re.match('(Spam\d)+', 'Spam4Spam2Spam7Spam8') print z.group(0) print z.group(1) # ---------------------------- outputting : -----------... candide
Pragmatics of the standard is() function1320 (11/26/2011 9:20:36 PM) comp.lang.python In which cases should we use the is() function ? The is() function compares identity of objects rather than values so I was wondering in which circumstances comparing identities of objects is really vital. E... candide
Use and usefulness of the as syntax1115 (11/12/2011 11:56:17 AM) comp.lang.python First, could you confirm the following syntax import foo as f equivalent to import foo f = foo Now, I was wondering about the usefulness in everyday programming of the as syntax within an import statemen... candide
__dict__ attribute for built-in types2422 (10/27/2011 10:08:45 AM) comp.lang.python I realize that built-in types objects don't provide a __dict__ attribute and thereby i can't set an attribute to a such object, for instance >>> a=[42,421] >>> a.foo="bar" Traceback (most recent call last)... candide
Importing a module from a non-cwd129 (10/24/2011 7:51:53 PM) comp.lang.python Hi, It's easy to open a file not located in the current working directory (cwd). But how about importing a module? For instance, suppose I have a file, say my_file.py, located in the cwd, say /home/candide/... candide
randrange exceptional behavior226 (10/24/2011 7:26:59 PM) comp.lang.python Where is documented the behaviour of the standard function randrange in the case of an empty list ? for instance randrange(42,33) ? May I rely on an ValueError type error? ... candide
Equivalent code to the bool() built-in function4521 (4/16/2011 8:24:37 PM) comp.lang.python Consider the following code : # -------------------------------------- def bool_equivalent(x): return True if x else False # testing ... def foo(x): return 10*x class C: pass for x in [42, ... candide(103)
What is this syntax ?1115 (6/19/2011 1:41:44 PM) comp.lang.python With Python 2.7 : >>> x="foo" >>> print '"'+x+'"' "foo" >>> What is this curious syntax on line 2 ? Where is it documented ? ... candide(103)
Usefulness of the "not in" operator5016 (10/8/2011 10:42:58 AM) comp.lang.python Python provides -- the not operator, meaning logical negation -- the in operator, meaning membership On the other hand, Python provides the not in operator meaning non-membership. However, it seems... candide(103)
K&R beginner code query2739 (10/10/2011 6:08:44 PM) comp.lang.c I'm trying to use K&R to learn C from but am having some trouble. Here's the code I'm trying to compile (from page 22 of the book) #include #define IN 1 /* inside a word */ #define OUT 0 /* outside a wo... carranty(4)
randrange exceptional behavior226 (10/24/2011 7:26:59 PM) comp.lang.python Where is documented the behaviour of the standard function randrange in the case of an empty list ? for instance randrange(42,33) ? May I rely on an ValueError type error? ... candide(103)
__dict__ attribute for built-in types2422 (10/27/2011 10:08:45 AM) comp.lang.python I realize that built-in types objects don't provide a __dict__ attribute and thereby i can't set an attribute to a such object, for instance >>> a=[42,421] >>> a.foo="bar" Traceback (most recent call last)... candide(103)
Use and usefulness of the as syntax1115 (11/12/2011 11:56:17 AM) comp.lang.python First, could you confirm the following syntax import foo as f equivalent to import foo f = foo Now, I was wondering about the usefulness in everyday programming of the as syntax within an import statemen... candide(103)
Pragmatics of the standard is() function1320 (11/26/2011 9:20:36 PM) comp.lang.python In which cases should we use the is() function ? The is() function compares identity of objects rather than values so I was wondering in which circumstances comparing identities of objects is really vital. E... candide(103)
Regexp : repeated group identification343 (12/14/2011 11:12:07 AM) comp.lang.python Consider the following code # ---------------------------- import re z=re.match('(Spam\d)+', 'Spam4Spam2Spam7Spam8') print z.group(0) print z.group(1) # ---------------------------- outputting : -----------... candide(103)
Regular expression : non capturing groups are faster ?620 (1/3/2012 11:14:35 AM) comp.lang.python Excerpt from the Regular Expression HOWTO (http://docs.python.org/howto/regex.html#non-capturing-and-named-groups) : ----------------------------------------------- It should be mentioned that there�s no per... candide(103)