portError: __import__ not found
Oops.
So, with no built-ins available, import no longer works. That makes things
rather tricky.
Obviously the easiest way to recover is to exit the current session and
restart it, but as a challenge, can we recover from this state?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
', '-1*x')
if term.startswith('x'):
term = term.replace('x', '1*x')
if term.endswith('x'):
term = term.replace('x', 'x^1')
to each term, which will give us something like:
['4*x^3', '1*x^2',
Marko Rauhamaa wrote:
> Dan Stromberg :
>
>> On Mon, Sep 29, 2014 at 4:47 AM, Steven D'Aprano
>>> Yes. Distribute the pyc files only.
>>
>> Yes, this is the way it's usually done.
>
> Has the .pyc file format stabilized? A decade ago, my employ
ll say that assignment is a third
kind of return, because one can assign output to a global variable.
(Since print does not actually exit the current sub-routine, it definitively
is not a kind of return.)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Peter Otten wrote:
> Steven D'Aprano wrote:
>> Obviously the easiest way to recover is to exit the current session and
>> restart it, but as a challenge, can we recover from this state?
>
> $ python3
> Python 3.4.0 (default, Apr 11 2014, 13:05:11)
> [
rning name is misleading, lambda is not deprecated. But stylistically,
many people prefer to use a generator expression in place of map or filter:
# instead of this
map(lambda x: 2*x+1, values)
# use this
(2*x+1 for x in values)
# instead of this
filter(lambda x: x > 23, values)
# use this
(x for x in values if x > 23)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Rustom Mody wrote:
> On Thursday, October 2, 2014 1:30:03 PM UTC+5:30, Steven D'Aprano wrote:
>> Chris Angelico wrote:
>
Restoring the attribution line you removed:
On Thu, Oct 2, 2014 at 12:29 PM, Rustom Mody
wrote:
>> >> So by now you know there are 2 kinds of r
On Fri, 03 Oct 2014 12:44:32 +1000, Chris Angelico wrote:
> On Fri, Oct 3, 2014 at 9:16 AM, Steven D'Aprano
> wrote:
>>> Anyway, pylint doesn't complain about a bare use of lambda, but it
>>> does complain about a map applied to a lambda or a filter applied
cess periodically is likely to be
orders of magnitude more expensive than that of moving a few blocks of
memory around from time to time. Especially on Windows, where starting
processes is expensive, but even on Linux you have to shut the running
application down, then start it up again and rebuild all
y how to solve a problem without giving them the answer.
While I don't condone mindless parroting of work that others have done,
remember that for tens of thousands of years, being shown how to do
something, then imitating that, has been the most effective way for people
to learn. Dropping hint
Chris Angelico wrote:
> On Sat, Oct 4, 2014 at 11:02 AM, Steven D'Aprano
> wrote:
>> Chris Angelico wrote:
>>
>>> In theory, a high
>>> level language like Python would be allowed to move objects around to
>>> compact memory, but CPython doesn
returns 1.
Given arguments 6 and 2, you want 0.0 == 0/2, and 6%2 returns 0.
Given arguments 8 and 3, you want 0.... == 2/3, and 8%3 returns 2.
P.S. the usual name for this function is "fraction part", sometimes "fp".
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
rstand the process for getting the URL of the
actual video file.
- You don't have Python installed.
- Your script is buggy.
- Or you simply forgot to press Enter and the script is just
sitting there, waiting.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 05 Oct 2014 20:23:42 +0100, mm0fmf wrote:
> On 04/10/2014 02:02, Steven D'Aprano wrote:
>> Way back in the mid 1980s, Apple Macintoshes used a memory manager
>> which could move memory around.
>
> But the memory manager didn't return a pointer to memory the
On Mon, 06 Oct 2014 09:05:17 +, jakubo wrote:
> After invoking autocompletion (.__ and hitting tab), session has been
> automagically healed.
That's ... um ...
I have no words.
Can you confirm that autocompletion modifies globals()? I don't have 3.4
installed he
es the "Offside Rule" (significant
indentation).
class MyClass(object): # subclass of object
def __init__(self, arg):
# Initialise the instance.
self.ins_var = arg
def method(self, arg):
return self.ins_var == arg:
instance = MyClass("some value&quo
a headache. You're obviously lying, acting,
delusional, an insentient robot programmed to repeat the words 'I have a
headache', a zombie (not the brain eating kind, the philosophical kind),
a sophisticated bot (but not sophisticated enough to pass the Turing
test), or otherwise faking it."
I'm just sayin'...
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
case, imgur) is down or blocked.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
othing. But if they are
unequal, assert will raise an exception and stop, and you know that the
two cases are not equivalent and can go on to the next possibility.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ing to say. Could you try
explaining again please?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
considered a month supply. The would be 4 weeks instead of one month.
Okay.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
; functions are actually:
operator.__add__;
operator.__sub__;
operator.__mul__;
etc., with the underscore-less versions being provided as a convenience.
Was anyone aware of this? It came as a surprise to me.
Is there anyone who uses or prefers the dunder versions?
--
Steven
--
https://mail.pyt
official
operator.__add__ function, and Terry Reedy says there are no tests for it.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
*string* "T r u e" with the constant True. It should be:
assert isinstance(x, bool)
if x: # don't write "if x == True" since that is redundant
color = 'Red'
else:
color = 'Blue'
x = not x
> Others?
color = ("Red", "Blue")[color == "Red"]
color = {"Red": "Blue", "Blue": "Red"}[color]
color = "Red" if color == "Blue" else "Blue"
There may be even more complicated, obscure or obfuscated versions possible.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
which it suppresses), while print outputs the str() of
them.
py> class Test:
... def __repr__(self): return "repr"
... def __str__(self): return "str"
...
py> x = Test()
py> x
repr
py> print(x)
str
That's an old, old part of Python, going
mm0fmf wrote:
> On 09/10/2014 02:29, Steven D'Aprano wrote:
>> Apart from the horrible spelling of colour :-)
>
> I've always spelt colour as "color" when programming and as "colour"
> when writing language including documentation about softwar
Terry Reedy wrote:
> On 10/9/2014 1:43 PM, mm0fmf wrote:
>> On 09/10/2014 02:29, Steven D'Aprano wrote:
>>> Apart from the horrible spelling of colour :-)
>>
>> I've always spelt colour as "color" when programming and as "colour"
>
Rustom Mody wrote:
> On Thursday, October 9, 2014 10:26:41 AM UTC+5:30, Steven D'Aprano wrote:
>> On Wed, 08 Oct 2014 19:34:30 -0700, Rustom Mody wrote:
>
>> >>>> Color.Red
>> >>>> print (Color.Red)
>> > Color.Red
>> >
te much Python code, do you? *wink*
It is not "rarely seen" in Python:
some_string.strip().replace("x", "y").upper().split()
sort of thing is extremely common in Python.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
x27;s the most readable version of all.
One last note: if you are using Python 3.3 or better, you can support
international text better by using the casefold() method rather than
lower(). In this case, it won't make a difference, but the technically
correct method for doing case-insensitive comparisons is to casefold both
strings rather than lower- or upper-case them.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ally think of three things:
- excessively long one-liners;
- excessive use of symbols and sigils ("line noise");
- "More Than One [Thousand] Ways To Do It"
Are you suggesting that Perl functions tend to be too small? What do you
consider "too small"?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
dom.random() < 0.5:
... alist.append("spam")
...
py> print(alist)
['spam', 'spam']
Because this is random, if you try it you will get an unpredictable number
of "spam" words in the list. About half the time it will contain no words
at all, about
rt isinstance(instance, Model)
# Code that assumes that instance is an object of type Model
That means that the logic for what is acceptable as a Model is all in one
place, namely the Model.get method, and callers don't need to care about
the pre-condition "argument is a Model or an integer ID", they only need to
care about the post-condition "result of get() is a Model".
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ch are bugs that need to be fixed, and which should be allowed through.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
]
Or better still, use a search engine that doesn't track and bubble your
searches:
https://duckduckgo.com/html/?q=python+sitemap
You can even LMDDGTFY if you insist.
http://lmddgtfy.com/
Completely-undermining-my-own-message-ly y'rs,
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
en in Python, I'd say there is a strong likelihood that one
that meets your needs and is publicly available under an appropriate
licence is vanishingly small.
If you do decide to write your own, please consider uploading it to PyPI
under a FOSS licence.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Simon Cropper wrote:
> Certainly doable but
> considering the shear commonality of this task I don't understand why a
> simple script does not already exist
Perhaps it isn't as common or as simple as you believe.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
7)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> object("two", "parameters")
In Python 2.2, the default object constructor accepts, and ignores, any
parameters. In Python 2.3 on up, that becomes an error.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Cameron Simpson wrote:
> On 30Aug2011 14:13, Steven D'Aprano
> wrote:
> | On Tue, 30 Aug 2011 08:53 am Arnaud Delobelle wrote:
> | >> Yes, but if I am not mistaken, that will require me to put a line or
> | >> two after each os.system call. That's almost
Hans Mulder wrote:
> On 9/09/11 11:07:24, Steven D'Aprano wrote:
>> Sure enough, I now have to hit Ctrl-C repeatedly, once per invocation of
>> script.py. While script.py is running, it receives the Ctrl-C, the
>> calling process does not.
>
> You misinterpret
You may be better off staying in
the same directory, and adjusting the path names to the files as you work
with them.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth wrote:
> Steven D'Aprano wrote:
>> In Python 2.2, the default object constructor accepts, and ignores, any
>> parameters. In Python 2.3 on up, that becomes an error.
>>
> More recently than that. It only became an error in 2.6:
For __init__, sure, bu
you see clearly that they are the same
array object. Try this:
combos = list(balls_in_numbered_boxes(2, [3,3,3]))
[id(a) for a in combos]
I expect you will see something like [123456, 123456, 123456].
The simplest fix is to fix the next() method so that it returns a copy of
self.distribution instead of the array itself.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
url both using the same proxy? It may be that one
is going direct and the other is using a proxy.
Or perhaps the destination is just flaky, and the resource genuinely is
temporarily unavailable. Or it doesn't like your useragent string and is
lying.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Cameron Simpson wrote:
> On 09Sep2011 22:16, Steven D'Aprano
> wrote:
> | Hans Mulder wrote:
> | > On 9/09/11 11:07:24, Steven D'Aprano wrote:
> | >> Sure enough, I now have to hit Ctrl-C repeatedly, once per invocation
> | >> of script.py. While script
Waldek M. wrote:
> On Fri, 09 Sep 2011 23:03:10 +1000, Steven D'Aprano wrote:
>> But think carefully before doing this. Some functions may be confused if
>> you change directories while they are running. You may be better off
>> staying in the same directory, and adjus
lone module outside the package
directory, and be done. (Your installer can still treat cheese.py as a
dependency of package, and ensure that they are both installed.)
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
init__.py # huge, imports my_app.module1, my_app.module2, etc.
then point rpc4django at my_app.rpc instead of my_app.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
)
Otherwise see the time and datetime modules:
http://docs.python.org/library/time.html
http://docs.python.org/library/datetime.html
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Cameron Simpson wrote:
> On 10Sep2011 11:25, Steven D'Aprano
> wrote:
> | Cameron Simpson wrote:
> | > My copy of the 2.7 docs says:
> | > This is implemented by calling the Standard C function system(), and
> | > has the same limitations.
> | >
ly, tracebacks ignore the function.__name__ and print the code
object name:
>>> f
>>> f("x")
Traceback (most recent call last):
File "", line 1, in
File "", line 1, in
TypeError: cannot concatenate 'str' and 'int' objects
On Wed, 31 Aug 2011 10:33 pm Steven D'Aprano wrote:
> Twice in a couple of weeks, I have locked up my PC by running a Python 2.5
> script that tries to create a list that is insanely too big.
>
> In the first case, I (stupidly) did something like:
>
> mylist = [0]*12345
e a quoted string literal, I would expect to get a SyntaxError.
I have come across this myself. While I haven't really investigated in great
detail, it appears to happen when copying and pasting code from a document
(usually HTML) which uses non-breaking spaces instead of \x20 space
characters. All
great. If you really fear rogue,
or malicious, scripts, perhaps Python is not the right language for this
task. Otherwise, just trust the script to be sane.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
n is to save a reference to the open built-in first:
my_open = open
open = "something"
file = my_open("filename", "r")
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 13 Sep 2011 05:49 pm jmfauth wrote:
> On 12 sep, 23:39, "Rhodri James" wrote:
>
>
>> Now read what Steven wrote again. The issue is that the program contains
>> characters that are syntactically illegal. The "engine" can be perfectly
>&g
t; interest: http://stackoverflow.com[...]
>
> I wonder why people ask this kind of question on stackoverflow, and then
> come here asking people to go over there, read the question, and
> (potentially) provide an answer.
You should post that question on stackoverflow, and ask them to repl
"someone
is wrong on the Internet!". If you want to see a news group gone bad, go to
something like sci.math. You can't move for the cranks "disproving"
Cantor's Diagonal Theorem and Special Relativity and proving that 10**603
is the One True Actual Infinity (I'm not making that last one up!).
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
erClass
are compatible. (If they're not compatible, you'll get an exception.)
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
reason i7 processes show
> slower performance?
Don't believe hardware manufacturer's advertising. These days, chip speed is
not so important. Cache misses are MUCH more critical: a slow chip with a
big cache will out-perform a fast chip with a small cache nearly always.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
t; Turkish i-s" at separate codepoints.
>
> Then one could have the three pairs
> I, i ("normal")
> I (other one), ı
>
> and
>
> İ, i (the other one).
And then people will say, "How can I match both sorts of dotless uppercase I
but not dotted I when I'm doing comparisons?"
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
, they
> are not launched with exec permissions.
>
> I don't know why the fname of the python interpreter changes across
> platforms.
Ask the person who built the system, or the people who made the
distribution. They are free to name the Python executable anything they
like.
--
Steven
-7):
b = (b[0]+b[0], b[1]-3)
while b > (0,9876):
b = tuple((lambda a,b: map(lambda a,b:a+b, a,b))
((lambda a,b: map(lambda a,b:a*b, a,b))
(b,(0,1)), (lambda a,b: map(lambda a,b:a-b, a,b))
(divmod(b[0],10),(0,64
print b[1]
--
Steven
--
http://mail.py
ntax
How about if you start off by explaining what you think "a cap for LaTeX"
means, or provide a link to something that will explain it? This is a
Python list, and we don't necessarily know much about LaTeX.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Westley Martínez wrote:
> def __radd__(self, other):
> return self.__add__(self, other)
Which, inside a class, can be simplified to:
__radd__ = __add__
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
to me that the rule is:
If the right-hand argument is a subclass of the left-hand argument, AND also
defines __radd__ directly rather than inheriting it, then its __radd__
method is called before the left-hand argument's __add__ method.
which strikes me as a strangely specific and not very useful rule. I suspect
it might be an accident of implementation rather than a deliberate feature.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
nsole_formatter)
test_logger.addHandler(console_handler)
test_logger.setLevel(logging.DEBUG)
test_logger.info('Test info')
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ot;, "copyright", "credits" or "license" for more information.
>>> import os
>>> (os.getenv('LINES'), os.getenv('COLUMNS'), os.getenv('TERM'))
(None, None, 'xterm')
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 21 Sep 2011 23:47:55 -0500, Andrew Berg wrote:
> On 2011.09.21 11:22 PM, Steven D'Aprano wrote:
>> You could
>> try something like this (untested):
> That works. Thanks!
> This makes me wonder what else stays around after a reload
Practically everything. A relo
Ben Finney wrote:
> Steven D'Aprano writes:
>
>> I don't understand why some environment variables are not visible from
>> Python.
>
> Not all variables are environment variables. Variables only become
> environment variables if exported to the environment;
down
sequence starts?" Find out how to do that, and then do it using Python
instead of another language.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
nstaller as a regular, unprivileged user, after selecting the option for a
Non-Admin Install under Advanced Options first. You could also try the
ActivePython installer.
http://www.richarddooling.com/index.php/2006/03/14/python-on-xp-7-minutes-to-hello-world/
http://diveintopython.org/installing_pyth
e@sylar ~]$ python3.2 -m timeit -s "from random import
randint" "randint(0, 1000000)"
10 loops, best of 3: 4.98 usec per loop
(The times are quite variable: the above are the best of three attempts.)
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Jesramz wrote:
> Hello,
>
> I am trying to deploy an app on google app engine using bottle, a
> micro-framework, similar to flask.
[...]
> ImportError: No module named zlib
What happens if you explicitly launch Python2.5 and then try to import zlib?
--
Steven
--
http://
ollowing attempt gives, however, a recursion error, but why?
Here is an old recipe showing how to do automatic delegation correctly:
http://code.activestate.com/recipes/52295/
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Chris Angelico wrote:
> On Fri, Sep 23, 2011 at 4:14 AM, Steven D'Aprano
> wrote:
>> What makes you think it's in C? I don't have Python 3.3a, but in 3.2 the
>> random module is mostly Python. There is an import of _random, which
>> presumably is in
perclasses are reachable. In the case of injection, they
aren't (at least not without more work).
* Inheritance is late-binding, injection is early-binding: if
you dynamically add a new method to Yamlafiable, Dog will
see the change in the first case but not the second.
That's n
rors. Note that the 7th
value is exact here, but not above.
Is there a way to pick between methods #1 and #2 (or some combination of the
two) without human intervention so as to minimise the rounding error? Or is
there some other way to generate equally-spaced floats? My efforts at
googling hav
Mark Dickinson wrote:
> On Sep 24, 2:53 pm, Steven D'Aprano [email protected]> wrote:
>> I'm trying to generate a sequence of equally-spaced numbers between a
>> lower and upper limit. Given arbitrary limits, what is the best way to
>> generate a
2.2, 2.5, 2.8003, 3.1]
>>>
>>> start, stop, n = -1, 1.1, 7
>>> [float(F(start) + i*(F(stop)-F(start))/n) for i in range(n+1)]
[-1.0, -0.7, -0.39997, -0.09996,
0.20004, 0.5001, 0.8, 1.1]
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Arnaud Delobelle wrote:
> On these examples, using fractions is no better than what I suggested
> in my previous post.
I'm sorry, I can't see your previous post. Perhaps it isn't available on my
news provider?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
o-format-integer-as-string-with-leading-zeros
http://msdn.microsoft.com/en-us/library/dd260048.aspx
http://www.ozgrid.com/forum/showthread.php?t=64193&page=1
http://www.google.com/codesearch#algXCqBNNP0/utils/zip2rep.py&q=lang:%5Epython$%20zfill%20case:yes&ct=rc&cd=7
http://www.goo
Terry Reedy wrote:
> On 9/24/2011 9:53 AM, Steven D'Aprano wrote:
[...]
>>>>> [0.0 + i*width for i in range(8)]
>> [0.0, 0.3, 0.6, 0.8999, 1.2, 1.5, 1.7998, 2.1]
>>
>> The 4th and 7th values have rounding errors, the rest are exa
Chris Angelico wrote:
> On Sun, Sep 25, 2011 at 3:01 AM, Steven D'Aprano
> wrote:
>> Mark Dickinson wrote:
>>
>>> Using Fraction for intermediate calculations actually works perfectly
>>> for this, since conversions from float to Fraction are exact, whi
actions module.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
so hard to show
a couple of examples?
Documentation like that really makes me appreciate the sterling work done on
Python's docs.
This tutorial:
http://www2.sas.com/proceedings/sugi30/263-30.pdf
is much clearer.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
skateboard desperately
hanging onto the bumper trying not to be left behind.)
You could try installing from source, if you have the appropriate Windows
development environment.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
loops inside tests, you might find this anecdote useful:
http://mail.python.org/pipermail/python-list/2011-April/1270640.html
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
m.
Forget money, or even the love of money. The idea that one mustn't
criticise another person's beliefs is the root of all evil.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
I have a Python script which I would like to test without a tty attached
to the process. I could run it as a cron job, but is there an easier way?
I am running Linux.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Westley Martínez wrote:
> Perhaps you should spend a little less time on the mailing list and a
> little more time in church.
Is that meant as punishment for Rick or for the churchgoers?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Alain Ketterlin wrote:
> Steven D'Aprano writes:
>
>> I have a Python script which I would like to test without a tty attached
>> to the process. I could run it as a cron job, but is there an easier way?
>>
>> I am running Linux.
>
> Isn't os.
Westley Martínez wrote:
> On this mailing list, we're programmers, nothing else,
Speak for yourself.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Devin Jeanpierre wrote:
> I also didn't reprimand anyone, except maybe Steven.
If you are more upset at my describing the Catholic Church as protecting
child molesters than you are at the Church for actually protecting child
molesters, then your priorities are completely screwed up
Chris Angelico wrote:
> On Fri, Sep 30, 2011 at 12:38 PM, Steven D'Aprano
> wrote:
>> Westley Martínez wrote:
>>
>>> On this mailing list, we're programmers, nothing else,
>>
>> Speak for yourself.
>>
>
> I don't think he meant
alex23 wrote:
> I'm slowly seeing more and more interest in applying
> a discipline that arose out of the
> study of religious texts.
Tell us more, please.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
gt;>>> re.compile(r"""^(?: [^y]* )""", re.X)
> <_sre.SRE_Pattern object at 0x7f4069cc3730>
>
> Is this a bug in python regex engine? Or maybe some incompatibility with
> Perl?
Before asking whether it is a bug, perhaps you should consider what (if
anything) that regex is supposed to actually do.
Perhaps you should post the Perl equivalent, and some examples of it in use.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
n other words, "if this were true, it would be unfortunate, therefore it
can't be true". The story of Mankind, really.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Gregory Ewing wrote:
> Steven D'Aprano wrote:
>> By the way, who removed the OT label from the subject line?
>
> Probably nobody "removed" it, they just replied to some earlier
> message that didn't have it.
I started the "Benefit and belief&
thon
just because they happen to be types.
Maybe in Python 4000 there will be a push to rationalise the case of
built-in types.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
8501 - 8600 of 15566 matches
Mail list logo