On Mon, 28 Aug 2017 11:27 pm, Pavol Lisy wrote:
> object = int # this could be trick
> ...
> class Spam(object):
> ...
>
> dis.dis show difference too, next line is just for "class
> Spam(object):" version:
> LOAD_GLOBAL 0 (object)
>
> So nor rebinding object nor rebinding
On 8/28/17, Steven D'Aprano wrote:
> In Python 3, what's the difference between these two classes?
> # implicitly inherit from object
> class Spam:
> ...
>
> # explicitly inherit from object
> class Spam(object):
> ...
>
> If you sense a trick question, you're right :-)
>
object = int #
In article <[EMAIL PROTECTED]>,
Johannes Bauer <[EMAIL PROTECTED]> wrote:
> David C. Ullrich schrieb:
>
> >> -- care to tell us what "a certain re.sub" is, and
> >> false in what way?
> >
> > Read the OP.
>
> Well, aren't you funny. Maybe you should have referenced the other
> thread so one c
David C. Ullrich schrieb:
-- care to tell us what "a certain re.sub" is, and
false in what way?
Read the OP.
Well, aren't you funny. Maybe you should have referenced the other
thread so one can find the OP?
Regards,
Johannes
--
"Wer etwas kritisiert muss es noch lange nicht selber besser
On 12 Jun 2008 12:32:13 GMT, Duncan Booth
<[EMAIL PROTECTED]> wrote:
>David C. Ullrich <[EMAIL PROTECTED]> wrote:
>
>> Practical question: What's a _complete_ list of the
>> escapes included in the "and so forth" in (**)?
>>
>> (Or is there a function somewhere that will convert
>> r"\remark{Hint
On Thu, 12 Jun 2008 14:12:31 +0200, Peter Otten <[EMAIL PROTECTED]>
wrote:
>David C. Ullrich wrote:
>
>> (Or is there a function somewhere that will convert
>> r"\remark{Hint}" to r"\\remark{Hint}" for me, and
>> do the same for precisely the escpapes referred to
>> in the "and so forth"?)
>
>I th
On Thu, 12 Jun 2008 05:12:55 -0700 (PDT), John Machin
<[EMAIL PROTECTED]> wrote:
>On Jun 12, 8:57 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote:
>> True or False? (no fair looking it up)
>>
>> (*) If repl is a string then re.sub(pattern, repl, s)
>> returns s with non-overlapping occurences of pa
David C. Ullrich <[EMAIL PROTECTED]> wrote:
> Practical question: What's a _complete_ list of the
> escapes included in the "and so forth" in (**)?
>
> (Or is there a function somewhere that will convert
> r"\remark{Hint}" to r"\\remark{Hint}" for me, and
> do the same for precisely the escpapes
David C. Ullrich wrote:
> (Or is there a function somewhere that will convert
> r"\remark{Hint}" to r"\\remark{Hint}" for me, and
> do the same for precisely the escpapes referred to
> in the "and so forth"?)
I think you just have to escape the backslash:
re.sub(pattern, replacement_string.repla
On Jun 12, 8:57 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote:
> True or False? (no fair looking it up)
>
> (*) If repl is a string then re.sub(pattern, repl, s)
> returns s with non-overlapping occurences of pattern
> replaced by repl.
>
> I assumed it was true - spent a few hours trying to
> fig
True or False? (no fair looking it up)
(*) If repl is a string then re.sub(pattern, repl, s)
returns s with non-overlapping occurences of pattern
replaced by repl.
I assumed it was true - spent a few hours trying to
figure out what was going on with a certain re.sub,
then noticed that (*) is fa
11 matches
Mail list logo