How to view tuples changed in a PostgreSQL transaction?
You can inspect the internal xmin to identify newly inserted row versions (note, that includes results from UPDATE):
SELECT * FROM foo_table
WHERE  xmin::text = (txid_current() % (2^32)::bigint)::text;

How so?
The function txid_current() returns the current transaction ID. However, while the internal transaction ID type in xmin is 32 bits wide and wraps around every 4 billion transactions,  txid_current() returns a bigint quantity, per documentation:

that is extended with an &quot;epoch&quot; counter so it will not wrap around during the life of an installation.

There is a thread on pgsql-hackers with Tom Lane discussing it.
I derived the safe WHERE condition from it.
Addressing comment: Deleted rows that were deleted in the same transaction are always invisible either way, so not included in the result.
Disclaimer
However, this does not work with subtransactions started with SAVEPOINT (or some other way, plpython can use subtransactions, too). Those spawn separate xids and there is currently no way to get the full list of xids belonging to the top transaction returned by txid_current(). In my search for a solution I found this closely related thread on pgsql-hackers:

Re: rows modified in current transaction

I don't currently see a reliable solution working around that limitation.
Related:

Can I select data inserted in the same uncommited transaction?