Re: How to convert 'รถ' to 'oe' or 'o' (or other similar things) in a string?

2016-09-18 Thread not1xor1
Il 18/09/2016 08:45, Steven D'Aprano ha scritto: integral part of the letter, like the horizonal stroke in English t or the vertical bar in English p and b, and in some languages they are modifiers, well... that is the Latin alphabet English has no T, P or B (or any other character) but is jus

Re: [Python-ideas] Inconsistencies

2016-09-12 Thread not1xor1
Il 12/09/2016 04:26, Chris Angelico ha scritto: So whoever created the Universe also created the Creator... No, God isn't part of the universe, any more than an author is part of his novel. your logic is based on the assumption that the _existance_ itself, i.e. the mere presence of something,

Re: alphanumeric list

2011-03-16 Thread not1xor1 (Alessandro)
Il 15/03/2011 09:10, yqyq22 ha scritto: I would like to put an alphanumeric string like this one EE472A86441AF2E629DE360 in a list, then iterate inside the entire string lenght and change each digit with a random digit. Do u have some suggestion? thanks a lot hi I'm not an experienced python

Re: subclassing str

2010-11-10 Thread not1xor1 (Alessandro)
Il 09/11/2010 03:18, Lawrence D'Oliveiro ha scritto: How exactly does a.f(b, c) save time over f(a, b, c) unfortunately in real world you have: objId = objId.method(args) vs. objId = moduleName.method(objId, args) I know you can use "from moduleName import *", but IMHO that pro

Re: subclassing str

2010-11-07 Thread not1xor1 (Alessandro)
Il 07/11/2010 07:41, Chris Rebert wrote: You could subclass UserString instead of str; all of UserString's methods seem to ensure that instances of the subclass rather than just plain strs or UserStrings are returned. See http://docs.python.org/library/userdict.html#UserString.UserString I'll

subclassing str

2010-11-06 Thread not1xor1 (Alessandro)
Hi, I'd like to know what is the best way to subclass str I need to add some new methods and that each method (both new and str ones) return my new type For instance I've seen I can do: class mystr(str): def between(self, start, end): i = self.index(start) + len(start) j = se