Many e-mail systems allow you to add a suffix to the username portion of
the address, separated by something like a "-", or, last time I checked for
gmail, by a "+", and it will still be delivered to the same mailbox. For
example, I expect mail sent to
ks.kennysoh+ad...@gmail.com
will still
Note that Vue is one option among many and could either be overkill or not
helpful enough for your specific use case OR BOTH. It's just modern, and
may be useful for projects beyond this one.
It doesn't hurt to be familiar with the grand daddy of them all: jQuery
(though many sneer at it today).
What happens in the browser stays in the browser, unless you do something
about it.
Forgive me if I'm being too basic below:
There are three approaches to click and see a filtering change, with trade
offs in performance, complexity, and the impact if the user's browser is on
a humble box.
1.
, menu
> and a few pages) then hand that over to the owners to maintain using
> TinyMCE?? What about mobile etc...?
>
> Johnf
>
> On 2/8/20 8:36 AM, Bill Freeman wrote:
>
> I have used Django Fiber: http://ridethepony.org/
> And several other CMS. I mostly used Ti
I have used Django Fiber: http://ridethepony.org/
And several other CMS. I mostly used TinyMCE.
The world may have moved on.
On Sat, Feb 8, 2020 at 11:02 AM johnf wrote:
> Thanks that is a start. I would also like something that will help with
> design of the pages/views.
>
> Johnf
>
> On
Note that these give the only value. This won't work if you have more than
one value in the dict, since you won't know which you will get. Where d is
the dict:
list(d.values())[0]
or
for i in d.values():
# use i here
print(i)
or
d[list(d)[0]]
I'm sure that there
's a bit overwhelming for a beginner like
> me. Guess I'll do a test run with Heroku's free account to get a feel of
> the process.
>
> Anyway, thanks again for all the efforts man!
>
> Cheers!
>
> Deb
>
> On Mon, Dec 2, 2019 at 8:41 PM Bill Freeman wrote:
>
>&
Deployment for a production environment is never without complications.
And that is affected by how much you choose to configure yourself. I
can't speak for Heroku, Digital Ocean, or Python Anywhere, because I
haven't used them. Perhaps some of their users will comment.
Even with virtual
SQLite is fine for development, but, unless things have changed, it is
single threaded, and unsuitable for a production environment. Most folks
seem to go for MySQL, though the fork MariaDB is usually preferred no that
Oracle owns MySQL. I prefer PostgreSQL (or just Postgres) because I think
TextField()
On Tue, Oct 8, 2019 at 12:42 PM Mohsen Pahlevanzadeh <
m.pahlevanza...@gmail.com> wrote:
> I need to create text data type in model.py, CharField() has max_len as
> mandatory, What do you recommend instead of CharField() ?
>
> --
> You received this message because you are subscribed
Once there was no such thing as a cookie that expired at browser close.
Note that such must be implemented by the user agent (browser), since
that's the only thing that knows if it has been closed. (And, in fact, if
you want it to be closed if the browser crashes, or if it is hard killed by
the
Like many tools, it will take longer to learn to use it well than it takes
to code a small project, though it will start to help along the way. As an
emacs user, I already had what I needed and more, so it was hard to justify
the extra effort, but I was working where everyone else used it, and it
Using git does not require github. You can use any accessible machine to
serve a git repository, to which you can push, and from which you can pull,
using, for example, git+ssh (you could also use an ssh tunnel, but git
supports ssh transport directly). Do set up ssh to require keys and not
I'm sure that you'll get many opinions, but:
I've had success with git, presuming that filesystem space is not very
tight on the remote server. You arrange your deployment scripts to run on
the remote (there are several tools to help with that, or for small scale
operations, ssh in and run them
At least on 2.7, python has no trouble with this:
d={'x-y': 4}
>>> import json
>>> json.dumps(d)
'{"x-y": 4}'
>>>
So that leave's Django's parsing of the order_by string, or just possibly
the database connector.
It probably won't work, but you could try:
You should be keeping settings.py secure. There's other stuff that
shouldn't be public. That's why the django project directories are not
included in the pages that the front end web server is allowed to serve,
among other things. Security is tough. There's no magic answer.
On Fri, Nov 30,
A context contains the variables that you want your template to be able to
access. It is common to want to access stuff from the request. You could
copy those things that you need into the dict that you pass to the Context
constructor or define an element of the dict to hold the Request object
pk uuids are made
> automatically. Thanks
>
> *“None of you has faith until he loves for his brother or his neighbor
> what he loves for himself.”*
>
> On Mon, Mar 5, 2018 at 2:16 PM, Bill Freeman <ke1g...@gmail.com> wrote:
>
>> Are you specifying the to_field a
Are you specifying the to_field argument, or are you letting it default?
And is the pk of the other model made by Django by default, or are you
explicitly specifying a foreign key constraint on some field of your own.
Things might be better in 2.0, but I've had my troubles with pk that isn't
an
I don't do development in Windows, so take this with a grain of salt, but
under the directory in which you created your virtualenv, there should be a
directory called "bin". In that there will be a couple of files whose
names begin with "activate". There may be one with an obvious Windows
You don't say what OS/platform you are using, and I don't know if what I
say below applies to Windows, but should be valid elsewhere.
Note, too, that I presume that you are using a command line (e.g.;
xterm/bash).
I also presume that you have managed to install virtualenv on your system.
If
Cached in browser, maybe?
On Tue, Aug 16, 2016 at 11:43 AM, Avraham Serour wrote:
> How do you know the query is cached?
>
> On Aug 16, 2016 6:33 PM, "술욱" wrote:
>
>> I forgot to say I reloaded (and restarted) nginx and uwsgi, but the query
>> is still
I have no immediate clue.
I know that, using nosetest, I can add -s and -v to the command line,
making it possible to drive pdb from the test, using:
import pdb;pdb.set_trace()
inserted in the code to get into pdb at the relevant point(s).
Evan if you're not running under nosetest, there
What is the definition of your __str__() method?
On Thu, Jun 9, 2016 at 4:11 PM, Neil Hunt wrote:
> Hello,
>
> I'm enjoying the tutorial and now I'm stuck on the second page (writing
> your first Django app part 2), shortly after this paragraph.
>
> 'It’s important to add
If you use a ManyToManyField, Django creates the join table for you. In
the rare case that you need to store additional data on the join table, you
can create your own and use ManyToManyField.through
On Fri, May 13, 2016 at 5:00 AM, Bruce Whealton <
futurewavewebdevelopm...@gmail.com> wrote:
>
This is a many to many relation. One contact can have multiple relations,
according to your text, but clearly, more than one contact can be family,
etc.
And if, instead, each contact can have only one relation, then the
ForeignKey goes in the Resource (contact) model, not the Relationship
Consider the tag.
On Fri, Mar 25, 2016 at 4:47 PM, Seti Volkylany
wrote:
>
> I had text in database on TextField. I am using this field in my template
> applying tag *linebreaksbr* but text displaying simple plain.
>
> In console I have next result:
>
> Out[60]: 'class
As far as learning python goes, especially if you already program in
another language, the tutorials at docs.python.org are quite good. If you
are using python 2 instead of python 3, note the "Docs for other versions"
section in the top of the left hand column. If you don't already program
in
important. You may have to clean up old DB content for that user before
the restore. So I might write the restore in python. But then, I've never
written DB PL, so I could be missing a bet.
On Thu, Mar 10, 2016 at 12:15 AM, Mike Dewhirst <mi...@dewhirst.com.au>
wrote:
> On 10/03/2016 11:15
The only problem I can think of with a DB script is that it may have to be
recoded at unpleasant times, such as when you run a migration to take a new
version with a security fix.
If you are going to do it in Django, it would be by saving stuff out to a
fixture, maybe with a custom management
The interesting thing is how chained assignment is implemented. In C, the
following is an expression, and has a value:
a = b
This leads to the compiler not being helpful for the famous =/== typo in
this like:
if (a = b) { ... }
In python the only expression in:
a = b = c
only has
Or clone into a new virtualenv (you are using virtualenv, aren't you, and
you are using requires.txt and pip, and your code is in revision control,
right?), then change the Apache configuration to use the new VE and restart.
On Wed, Feb 17, 2016 at 7:00 AM, Mike Dewhirst
I suggest that you use Celery.
If people are making HTTP requests of you, that is reason enough to choose
Django.
But do not wait for long calculations to complete before returning an HTTP
result. Instead redirect to a page containing simple JavaScript that will
poll for a result.
PostgreSQL
You don't say what your front end is. There are ways to use pdb with
apache, look for advise on the modwsgi site.
But if you are in production, rather than just bringing up the instance
that will be production, you may not want to interrupt.
Be sure that you can't reproduce the problem in the
Yes, though there probably isn't a slick app for the PC to do it.
You would have a web server running on the Pi, maybe Django, that displays
the available wireless networks. You would want a button to re-scan. This
works by trigering a shell command to run iwlist (or whatever the current
tool
Did you see some documentation that said that the test framework will clear
the database?
I'm not sure that it's reasonable to ask a test framework to do that, given
the number of possible databases and interface layers, though it is
conceivable that django's variation on test could take care of
Make test b clean up after itself, by deleting the test object.
On Wed, Dec 2, 2015 at 9:28 AM, Tim Graham wrote:
> It will be easier to help if you can provide a sample project that
> reproduces the error.
>
> On Wednesday, December 2, 2015 at 3:01:31 AM UTC-5, Siddhi
l most of time.
>
> 2015-09-23 12:10 GMT-06:00 Bill Freeman <ke1g...@gmail.com>:
>
>> I would be upset to find an app that I installed fiddling with my project
>> settings.
>>
>> On Wed, Sep 23, 2015 at 12:53 PM, Luis Zárate <luisz...@gmail.com> wrot
How technical are your users?
What are your security constraints?
How much work can you do to make it "pretty"? (Believe me, someone will
ask.)
Are there fields that you want to administer internally but don't want to
expose to the users?
Will your users object if you decide to move to a newer
I would be upset to find an app that I installed fiddling with my project
settings.
On Wed, Sep 23, 2015 at 12:53 PM, Luis Zárate wrote:
> Hi,
>
> l have an app than need other apps to run well, I create a requirements
> file and setup file and insert the required apps in my
What does the following say?
Entry.objects.filter(pub_date__year=2015)[0].pub_date.month
If it says 7, then its time to delve into the generated SQL for the month
query.
On Tue, Sep 22, 2015 at 10:52 AM, lxm wrote:
> I create a class named Entry,like this:
>
>> class
One interesting feature of YAML is the ability to have custom operators.
For example, with YAML used as a fixture, you might have an operator that
turns a hex string into a MongoDB ObjectId on read, or a date string into a
datetime object, meaning that you don't have to post process the data
read.
If you have your heart set on a circuit breaker pattern (patterns are
overrated, see http://www.paulgraham.com/icad.html), consider implementing
it in the client.
If you need a long poll solution, note that you can serve some urls from
uwsgi/Django and others from tornado or twisted.
If you are
In Django, requests should not wait, since the threads are relatively
heavyweight in python, and need to be a limited resource. The alternative
is a large number of processes, which is also expensive.
So you must design a scheme in which the client polls for a result, meaning
that you cannot
Look at "Sites" in the admin.
On Thu, Aug 6, 2015 at 5:03 PM, Malik Rumi wrote:
> I have 1 model from my django project up and running on django. Before
> adding more models and content, I wanted to use my actual domain name,
> instead of whatever.herokuapp.com. So after
t; something in Django beyond merely connecting to the server and maybe
> configuring the admin? I am getting tired of just connecting to the server
> and then "calling it a day" if you know what I mean.
>
>
>
> On Wed, Jul 22, 2015 at 1:20 PM, Bill Freeman <ke1g..
quot;. I got it gpoing. I had just forgotten to do
> this command : "pip install django" in the "burrus" virtual environment
> inst ance! I still have the shakiest knowledge of django in general so
> little mistakes like this I am gonna have a little while longer.*
&
I presume that you have actually checked for a django-admin.py file in the
Scripts directory?
On Wed, Jul 22, 2015 at 12:58 PM, Steve Burrus
wrote:
>
> *well I haVE tried both this "python .\Scripts\django-admin.py
> startproject me" and Bill's suggestion opf "python
Note that this is a limitation of you shell. (I presume that you are using
cmd.exe.) On linux in bash the tutorial version works fine.
You are likely to find a number of things that are different from the
experience of the document writers if you are using Windows.
On Wed, Jul 22, 2015 at
Try no space between ".\Scripts\" and "django-admin.py"
You could also try forward slashes on the django-admin.py line (I think
that you need the back slashes on the activate line).
And I don't think that you need the ".\" on the django-admin.py line.
And, if that activate is activating a
You will want a routing view, or a fallback cascade. In either case, make
that urlpattern r'^([\w-]+)$'. You don't need to escape the - because it's
the last char in the class. You don want to restrict the urls to those in
which the entire url matches (^ and $), and the parentheses capture the
You don't show where the 'Image' object comes from (in Image.open), so I
can't be specific, but here are some generalities:
"Incorrect padding" is probably a message from the base 64 decoder.
Capture your request.POST[photo] to play with separately. If you are doing
this under the development
n't
> figured out yet how to do that I am afraid.
>
>
>
> On Wed, Jul 1, 2015 at 5:51 PM, Bill Freeman <ke1g...@gmail.com> wrote:
>
>> As long as you're happy with the default file name.
>>
>> On Wed, Jul 1, 2015 at 6:06 PM, Gergely Polonkai <gerg...@pol
As long as you're happy with the default file name.
On Wed, Jul 1, 2015 at 6:06 PM, Gergely Polonkai <gerg...@polonkai.eu>
wrote:
> No, Django does that for you. You only have to worry about DB settings if
> you want something else like MySQL or Postgres.
> On 1 Jul 2015 23:40
d was [finally]
> able to connect to the django server. I assume trhat I can easily do the
> "python manage.py syncdb" to connect to the sqllite3 server?
>
>
> On Wed, Jul 1, 2015 at 3:58 PM, Bill Freeman <ke1g...@gmail.com> wrote:
>
>> It sounds like dja
t; line 8, in from django.core.management import
> execute_from_command_line ImportError: No module named
> django.core.management" I r enamed my newly created project to "src".
>
>
> On Wed, Jul 1, 2015 at 3:14 PM, Bill Freeman <ke1g...@gmail.com> wrote:
>
>> cd to the di
cd to the directory containing manage.py (the project directory), then:
python manage.py runserver
On Wed, Jul 1, 2015 at 2:04 PM, Steve Burrus
wrote:
> well I was able to create a new project earlier however I am now having
> trouble with starting the django ser
You probably don't want request.body. You are probably POSTing the JSON
using a form, which means that it shows up as something like
request.POST['data'], where you should replace 'data' with the name of the
form element (textarea?) where you are putting the JSON. Posting with a
form wraps
If your JavaScript comes from a django template, yes, the comment tag will
work. If, instead, you want the lines delivered to the browser, but
commented out as far as JavaScript is concerned, use /* to start the
comment and */ to end it -- multiple lines are allowed.
On Fri, Jun 19, 2015 at
Is this under manage.py or behind a wsgi front end like Apache/mod_wsgi or
ngnx?
If under manage.py, you need to cd to the directory containing manage.py
first. (There are ways around this if absolutely necessary.) If behind a
wsgi front end, there are other means for insuring that this
Are you saying that you can't access it as django.jQuery ?
On Tue, Jun 2, 2015 at 4:22 AM, guettli wrote:
> I guess I am missing something.
>
> Is there no way to load jquery only once per page?
>
> Use case: I have two widgets which need jquery. I want to use
> these widgets
If the "new" app doesn't need services from the larger app in order t work,
but rather the other way around, why not leave it separate, and later, just
make it an install requirement for the larger app?
On Thu, May 28, 2015 at 5:54 AM, Klaas Feenstra wrote:
> Using GIT would
Can you access the js files via their static urls?
Does your html load the js (e.g. in script tags)?
Can you make it work with html accessed via file:/// type urls (keeping
django out of the mix)?
On Tue, May 19, 2015 at 10:06 PM, Robert librado
wrote:
> Anybody
With suitable privileges, you can drop the database and recreate it. In at
least some databases the user privilege grants are not lost with the
database and don't have to be recreated when the database is.
And, if you're using SQLite, just remove the file.
On Wed, Apr 29, 2015 at 6:10 AM, lars
be the last one overall. Any of your
other patters, for you Django views, for example, have already not matched
by the time this one gets tried.
On Wed, Apr 22, 2015 at 11:17 AM, Bill Freeman <ke1g...@gmail.com> wrote:
> By the way, you can test whether the regular expression matches without
/css/style.css') #
Does not match
>>> re.match(r'^(?P(?:js|css|img)/.*)$', 'apps/another.html')#
Does not match
>>> re.match(r'^(?P(?:apps|js|css|img)/.*)$', 'apps/another.html')
<_sre.SRE_Match object at 0x7fb34977ddc8>
>>> _.groups()
('apps/another.html',)
>
Are css and js subdirectries of apps as implied by the (as received)
indentation of your message? Note that your "other" url pattern has js,
css, and img, but no apps.
On Wed, Apr 22, 2015 at 9:28 AM, LiteWait wrote:
> Well, this doesn't work completely.
>
> Consider the
parameter (
> (\w+)/) will be passed to my appropriate view !!
>
> On Wed, Apr 22, 2015 at 1:15 AM, Bill Freeman <ke1g...@gmail.com> wrote:
>
>> I think that it is the question mark in your url pattern that is causing
>> the problem. In a real url, questio
That may work for most static things. The question is whether the static
server is happy with an empty path, assuming that you're trying to serve
"/" this way. If not, you might add a separate (earlier) pattern of r'^$'
that specifies a path in the extra parameters dictionary (where you have
If I understand your needs, try r'^$', which will catch only the top of the
site. (You might want r'^(?:index.html)?$' in case some old browser you
deal with has that fiddle, but the browser really should try what you typed
first.)
On Tue, Apr 21, 2015 at 3:02 PM, LiteWait
I think that it is the question mark in your url pattern that is causing
the problem. In a real url, question mark separates the path from the
query parameters. Parentheses in url patterns are for capturing parts of
the path, and are not associated with query parameters. Just leave out the
?
It sounds as though you have a set of sensors (scales, license readers,
barcode readers) which provide their readings over asynchronous serial
(that's what pyserial can connect with). You have some computer or set of
computers that collectively provide a sufficient number of serial ports to
There is a sense in which what you are describing, for the Django side, is
what a webserver, including one involving Django, ordinarily does.
The only requirement the web server makes (and some can get around it with
work) is that the data sent over the socket, at least from the client
But that's what the template loader does. It loads *DJANGO* templates. If
it does the loading, the template will receive Django processing.
I see two choices:
1. Quote everything in the template that looks like a Django template
special syntax so that the rendering process instead just renders
You should really decouple yourself from the distro's choices, saving
headaches in the future. Let me expand on Avraham's suggestion.
There is little difficulty in having more than one version of python on a
box. The main caution here is that the distrio's use of python might
depend on that
eval() operates on an expression, not a statement. Assignment makes it a
statement.
Why wouldn't you just say:
innerDict['+newinnrkey+'] = newinnrval
On Tue, Mar 10, 2015 at 5:25 PM, Henry Versemann
wrote:
> I have a new dictionary that I want to build, using data
OK. but I need more code context. The if statement that does the
modification is clearly python, so at that point rspnsdata must be a python
dictionary, not a JSON string. Yet, if I understand you correctly, it is
JSON to begin with (and you are using json.loads() to turn it into python
data so
If it's not the basics, then you haven't provided enough information to
allow someone to spot the problem. If you post the code that is performing
the modification, someone may be able to spot the issue.
On Mon, Mar 9, 2015 at 1:50 PM, Henry Versemann
wrote:
> Yes Id did
Did you remember to set the content type of your response to
application/json?
On Mon, Mar 9, 2015 at 1:18 PM, Henry Versemann
wrote:
> First to be clear up front let me say that I'm using Django1.7, Python
> 2.7.8, and the requests (Requests: HTTP for Humans
>
Sleeping in a web server, which potentially has many users, is considered
bad form, even if it works. A better place for such time outs is in
JavaScript in the browser. Some designs use a view that the JavaScript (or
user) can poll to determine when the resource is available.
On Wed, Mar 4,
Show me your view.
On Thu, Feb 12, 2015 at 2:49 PM, Ronaldo Bahia wrote:
> Thanks for answering.
>
> Can you provide some example?
>
> Cheers
>
> Em quinta-feira, 12 de fevereiro de 2015 17:00:28 UTC-2, ke1g escreveu:
>>
>> I presume that your messages are model instances.
I presume that your messages are model instances. If so, create a queryset
for the unread messages in your view, and pass that, or the result of
applying .count() to it, as a template context variable, say
"unread_message_count".
On Thu, Feb 12, 2015 at 1:06 PM, Ronaldo Bahia
It looks like you are typing "*django-admin.py startproject WebSite*" at
the python prompt, which is incorrect. You type it at the shell. If you
get command not found, then instead type "python
full/path/to/django-admin.py startproject WebSite". And in any case, the
current directory must be
Note that if these images will be displayed on the site it is best done by
your front end (Apache, ngnx, etc.) since the HTML to show them treats them
as a separate request, and serving static files is your front end's forte.
The front end knows how to do this with files, but probably not with
Perhaps the most djangoish way would be to create two model forms, with
different fields excluded, and choose which to render in the template.
Or you could render CSS style information to hide one or the other.
Or you could use JavaScript to hide one or the other based on something
else that you
I just use emacs. One of the original open source tools. Template syntax
support requires a plugin, and I might try one some day, but html mode has
been satisfying so far. Also, since I know how to type, running my own
management commands in an emacs shell window works for me. This sort of
This is from my logging config file from a non-django project, but the
principals should be similar.
Before you look too hard here, are you sure that rsyslog.d (or
equivalent) is running on the box (at which you have targeted the
logger?
Is the facility on which you are logging configured (In my
+1 on tornado. I may be behind the times, but I don't think that the
Django architecture lends itself to persistent connections. Also, Django
is intended to run behind another server, such as Apachi, nginx, etc., and
that server, too, would need to be amenable to persistent connections.
This
Right. I thought of that later.
But virtualenv or not is still just a different sys.path, and you still
have to have your stuff installed in the correct python.
On Wed, Aug 6, 2014 at 1:53 PM, Bill Freeman <ke1g...@gmail.com> wrote:
> Though if he's moving to nginx, thus not mod_wsgi
Though if he's moving to nginx, thus not mod_wsgi, I guess it doesn't
matter what mod_wsgi is linked against.
On Wed, Aug 6, 2014 at 1:49 PM, Collin Anderson
wrote:
> Actually, that's a good point. I always use the same python version that's
> linked with mod_wsgi. I
Performance *should* be identical.
All that virtualenv does (from the point of view of the executing python
program) is to change how sys.prefix and sys.exec_prefix are set, and thus,
how sys.path is calculated.
But with a vanilla sys.path, you need to be sure that django, your other
It runs twice because runserver uses two processes: the real server, and;
the monitoring process that restarts the other when you change a source
file. You could fool around with undocumented internals to figure out which
a given import is running in. Or you could use a modifies runserver
Are you keeping the cookies and returning them is subsequent requests?
(Particularly the session cookie, but all will work as well - if this is
the problem.)
On Thu, Jul 17, 2014 at 1:50 PM, Carlos Perche wrote:
> Hello guys, could someone help me with this ...
>
I make it a point to never use a python build that comes from a .deb for
any real development.
The OS vender may require certain python features for its management
scripts, but I don't like my development tools changing out from under me.
Build yourself a python from source, putting it some
I don't know how fussy about not using stuff from django you are, but the
following works for me:
$ DJANGO_SETTINGS_MODULE=foo.ct python
>>> from django.conf import settings
>>> settings.INSTALLED_APPS
Obviously, you replace "foo" with the name of your project. This prints my
installed
One possibility is that you have it, but it is in a directory that is not
on you path. Try:
find / -name pg_config 2> /dev/null
If this finds the executable, you can add the directory your current
invocation of the shell (It will be gone when you log out and back in) to
do the pip install.
I'm having trouble installing mysql-python because the MariaDB installed
libmysqlclient_r.a is "incompatible" (missing dependencies according
to
http://data-matters.blogspot.com/2013/08/install-mysql-python-with-mariadb.html).
There is rumored to be a fixed package for deb based systems, but
Still, the OP's command should have worked. The most likely problem is
that Django was installed to a different python than the one he gets when
he types "python" at the shell. He does not say how he installed Django,
so it is hard to advise.
On Wed, Jun 11, 2014 at 6:23 AM, Daniel Roseman
, May 12, 2014 at 9:04 AM, Bill Freeman <ke1g...@gmail.com> wrote:
> But the code works, right?
>
> This is a PyDev issue, not a Django issue.
>
> (If you can only use code that your IDE understands, that leaves out a lot
> of interesting programs.)
>
>
> On Mon, May
a += b
is nominally the same as
a = a + b
To make class instances support this behavior the class can implement the
__iadd__ special method. See docs.python.org and read about special
methods.
This notation originated, so far as I know, in the C language. It at least
goes back that far.
On
1 - 100 of 837 matches
Mail list logo